On Wed, Jun 25, 2014 at 7:31 PM, Shigio YAMAGUCHI <[email protected]> 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, dhruva
global-batch-update.patch
Description: Binary data
global-logical.patch
Description: Binary data
global-test-cleanup.patch
Description: Binary data
_______________________________________________ Bug-global mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-global
