Re: [PATCH v2 14/14] Add git-check-ignore sub-command

2012-09-26 Thread Junio C Hamano
Johannes Sixt writes: >> These days, we do not add random subcommands willy-nilly (I still >> doubt if check-ignore needs to be a separate debugging command, or a >> new mode of operation of ls-files or something), so the approach to >> use a blacklist makes more sense. "help -a" is designed to

Re: [PATCH v2 14/14] Add git-check-ignore sub-command

2012-09-25 Thread Johannes Sixt
Am 9/26/2012 1:25, schrieb Junio C Hamano: > Johannes Sixt writes: > >> Am 9/20/2012 21:46, schrieb Adam Spiers: >>> test_expect_success 'general options plus command' ' >>> - test_completion "git --version check" "checkout " && >>> - test_completion "git --paginate check" "checkout " && >>>

Re: [PATCH v2 14/14] Add git-check-ignore sub-command

2012-09-25 Thread Junio C Hamano
Johannes Sixt writes: > Am 9/20/2012 21:46, schrieb Adam Spiers: >> test_expect_success 'general options plus command' ' >> -test_completion "git --version check" "checkout " && >> -test_completion "git --paginate check" "checkout " && >> -test_completion "git --git-dir=foo check" "c

Re: [PATCH v2 14/14] Add git-check-ignore sub-command

2012-09-21 Thread Junio C Hamano
Adam Spiers writes: > +expect_in () { > + dest="$HOME/expected-$1" text="$2" > + if test -z "$text" > + then > + >"$dest" # avoid newline > + else > + echo -e "$text" >"$dest" This breaks when your shell is not "bash". > +test_check_ignore () { > + ar

Re: [PATCH v2 14/14] Add git-check-ignore sub-command

2012-09-21 Thread Junio C Hamano
Michael Haggerty writes: >> +For each pathname given via the command-line or from a file via >> +`--stdin`, this command will list the first exclude pattern found (if >> +any) which explicitly excludes or includes that pathname. Note that >> +within any given exclude file, later patterns take pr

Re: [PATCH v2 14/14] Add git-check-ignore sub-command

2012-09-21 Thread Michael Haggerty
On 09/20/2012 09:46 PM, Adam Spiers wrote: > This works in a similar manner to git-check-attr. Some code > was reused from add.c by refactoring out into pathspec.c. > > Thanks to Jeff King and Junio C Hamano for the idea: > http://thread.gmane.org/gmane.comp.version-control.git/108671/focus=10881

Re: [PATCH v2 14/14] Add git-check-ignore sub-command

2012-09-20 Thread Johannes Sixt
Am 9/20/2012 21:46, schrieb Adam Spiers: > test_expect_success 'general options plus command' ' > - test_completion "git --version check" "checkout " && > - test_completion "git --paginate check" "checkout " && > - test_completion "git --git-dir=foo check" "checkout " && > - test_c

[PATCH v2 14/14] Add git-check-ignore sub-command

2012-09-20 Thread Adam Spiers
This works in a similar manner to git-check-attr. Some code was reused from add.c by refactoring out into pathspec.c. Thanks to Jeff King and Junio C Hamano for the idea: http://thread.gmane.org/gmane.comp.version-control.git/108671/focus=108815 Signed-off-by: Adam Spiers --- .gitignore