From: Linus Torvalds Date: Sat, 10 Nov 2007 02:43:07 GMT Subject: Re: [PATCH] git-add: make the entry stat-clean after re-adding the same contents Message-ID: 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