On Wed, Jun 25, 2014 at 10:17 PM, Shigio YAMAGUCHI <[email protected]> wrote:
>
> 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.
The below code segment in gtags/gtags.c performs deletion of tags if
are present:
if (fid == NULL) {
if (added) {
strbuf_puts0(addlist,
path); <-- We just add and nothing to remove since fid is NULL
total++;
}
} else if (added) { <-- If added based
on prefix '+'
strbuf_puts0(addlist, path);
total++;
idset_add(deleteset, n_fid);
<-- we delete the tags on update since fid is not null
} else { <-- If deleted based on prefix '-'
strbuf_puts0(deletelist, path);
idset_add(deleteset, n_fid);
total++;
}
>
> 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.
The tags for the above files exist and the above code snippet handles
the add versus update based on fid.
with best regards,
dhruva
_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global