Re: [PATCH] git-add: make the entry stat-clean after re-adding the same contents
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Nov 10, 2007, 02:43 UTC
- Message-ID
- <alpine.LFD.0.999.0711091840120.15101@woody.linux-foundation.org>
- In-Reply-To
- <7vzlxmq1oj.fsf_-_@gitster.siamese.dyndns.org>
On Fri, 9 Nov 2007, Junio C Hamano wrote:
> > -int run_diff_files(struct rev_info *revs, int silent_on_removed) > +int run_diff_files(struct rev_info *revs, int option)
Wouldn't it be much better to now - make it "unsigned int flags" - create a few enums or #define's to make the usage be more readable?
Because this:
>- run_diff_files(&rev, 0);
>+ run_diff_files(&rev, 2);
> - !ie_modified(istate, istate->cache[pos], &st, 1)) {
> + !ie_match_stat(istate, istate->cache[pos], &st, 3)) {just went from subtle to "incredibly non-obvious".
I realize that 3 is "silent + assume_racy" and 2 is just "assume_racy", but I may realize that now, and in a month? I'd need to look it up.
Linus