bug-global
[Top][All Lists]
Advanced

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

Re: Added support for file list in single file update


From: Shigio YAMAGUCHI
Subject: Re: Added support for file list in single file update
Date: Thu, 26 Jun 2014 14:17:18 +0900

> > If '+' means both of 'addition' and 'change', you need to call stat()
> > to distinguish them, I think.
>
> I get your point. I might process the file even if the GTAG file is
> newer than the source file. But, I would like to believe the user's
> judgement when they use '+' and interpret it as "just force an
> update".

It is the current behavior.
What I want to say is that 'addition' and 'change' is different.
change =  deletion + insertion
addition = only insertion

If you don't differ both, you will insert twice.

> >> 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.
> >>
> >> > 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
> >
> > Please let me ask again in another way as follows.
> > Does file1.cpp exist at the time of the test?
> > Does file2.cpp exist at the time of the test?
> > Does file3.cpp exist at the time of the test?
> > Does file4.cpp exist at the time of the test?
>
> Yes, they all exist at the time of test.

I'm sorry to make wrong questions.
These are right questions.

Does path of 'file1.cpp' exist in GPATH just before the test?
Does path of 'file2.cpp' exist in GPATH just before the test?
Does path of 'file3.cpp' exist in GPATH just before the test?
Does path of 'file4.cpp' exist in GPATH just before the test?

If it exists in GPATH, it is a change else an addition.

-- 
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

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