Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-26 Thread Jonathan Nieder
Junio C Hamano wrote: > --- a/builtin/add.c > +++ b/builtin/add.c > @@ -495,6 +495,8 @@ int cmd_add(int argc, const char **argv, const char > *prefix) > refresh(verbose, pathspec); > goto finish; > } > + if (implicit_dot && !prefix) > + refresh_ca

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-26 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Nieder writes: > >> Maybe the warning should happen after add_file_to_index() has run, >> letting git compare the old and new index entries for that path? > > Yeah, new and deleted cases we do not have to worry about, so a > no-op add_file_to_index() is the only

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Jonathan Nieder writes: > Maybe the warning should happen after add_file_to_index() has run, > letting git compare the old and new index entries for that path? Yeah, new and deleted cases we do not have to worry about, so a no-op add_file_to_index() is the only case we have to be careful. There

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Jonathan Nieder
Junio C Hamano wrote: >> Jonathan Nieder writes: >>> Do you mean files that were touched but have no content change, or >>> something more subtle? [...] > Ahh, I haven't run anything under the debugger yet, but I think I > know what is going on. > > Don't we limit our "update-index --refresh" equ

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Nieder writes: > >> Junio C Hamano wrote: >> >>> At the point of calling warn_pathless_add(), it seems that we are >>> triggering this for paths that are not necessarily modified when run >>> with "add -n -u". >> >> Do you mean files that were touched but have n

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Jonathan Nieder writes: > Junio C Hamano wrote: > >> At the point of calling warn_pathless_add(), it seems that we are >> triggering this for paths that are not necessarily modified when run >> with "add -n -u". > > Do you mean files that were touched but have no content change, or > something mo

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Jonathan Nieder
Junio C Hamano wrote: > At the point of calling warn_pathless_add(), it seems that we are > triggering this for paths that are not necessarily modified when run > with "add -n -u". Do you mean files that were touched but have no content change, or something more subtle? -- To unsubscribe from thi

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Junio C Hamano writes: > One thing I noticed about Jonathan's warn_pathless_add() thing is > that even though it knows for which path we would behave differently > between the current version and Git 2.0, the warning message does > not say which path outside the current directory would be added i

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Junio C Hamano writes: > Applying Jonathan's idea on top of the early part that has graduated > to 'master', here is to add "--ignore-removal" (which is a more > natural way to say "--no-all") and use it in the warning message. > > Junio C Hamano (2): > git add: --ignore-removal is a better nam

[PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-22 Thread Junio C Hamano
Applying Jonathan's idea on top of the early part that has graduated to 'master', here is to add "--ignore-removal" (which is a more natural way to say "--no-all") and use it in the warning message. Junio C Hamano (2): git add: --ignore-removal is a better named --no-all git add: rephrase -A/-