[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Added support for file list in single file update

From: dhruva
Subject: Re: Added support for file list in single file update
Date: Wed, 25 Jun 2014 19:41:42 -0700

On Wed, Jun 25, 2014 at 7:31 PM, Shigio YAMAGUCHI <address@hidden> wrote:
>> > I guess that most everyday updating are change.
>> > If so, it means that you cannot reduce stat() greatly.
>> I can by using '+'. I use '+' for added/modified files.
> I was convinced as follows:
> o '+' means 'addition'
> o '-' means 'deletion'
> Would you please explain the meaning of '+' and '-' ?
> What will occur without the prefix?

When you modify or add a new file, gtags update works by deleting all
the tags for the corresponding file, parsing and adding them fresh.
Hence, I treat modify/add similarly and use '+' to denote that. '-'
denotes the file is deleted and hence delete the tags associated with
files prefixed by '-'.

Without the prefix, it will perform stat() to decide. If the stat()
fails with ENOENT or ESTALE, I treat the file as deleted. If the
stat() succeeds and the time stamp is newer than the GTAG DB file, we
treat it as updated/modified/new, this is existing/default behavior.

>> prefix.files:
>> +path/to/some/file1.cpp
>> +path/to/some/file2.cpp
>> +path/to/some/file3.cpp
>> +path/to/some/file4.cpp
>> non-prefix.files:
>> path/to/some/file1.cpp
>> path/to/some/file2.cpp
>> path/to/some/file3.cpp
>> path/to/some/file4.cpp
>> [PS: I am not sharing the actual file names to avoid sharing any company
>> data]
> Would you please tell me whether it is 'addition' or 'change' per file.

This is equivalent to calling (without my modifications):
$ gtags --single-update path/to/some/file1.cpp
$ gtags --single-update path/to/some/file2.cpp
$ gtags --single-update path/to/some/file3.cpp
$ gtags --single-update path/to/some/file4.cpp

I have split the changes into 3 separate patch files. I am now using
git to track my changes locally and will better manage my local
changes going forward.

with best regards,

Attachment: global-batch-update.patch
Description: Binary data

Attachment: global-logical.patch
Description: Binary data

Attachment: global-test-cleanup.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]