git-check-attr: Fix command-line handling to match docs
According to the git-check-attr synopsis, if the '--stdin' option is used then no pathnames are expected on the command line. Change the behavior to match this description; namely, if '--stdin' is used but not '--', then treat all command-line arguments as attribute names. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c9d8f0ac3b
commit
ca64d061e0
@ -70,7 +70,6 @@ test_expect_success 'command line checks' '
|
||||
echo "f" | test_must_fail git check-attr --stdin &&
|
||||
echo "f" | test_must_fail git check-attr --stdin -- f &&
|
||||
echo "f" | test_must_fail git check-attr --stdin test -- f &&
|
||||
echo "f" | test_must_fail git check-attr --stdin test f &&
|
||||
test_must_fail git check-attr "" -- f
|
||||
|
||||
'
|
||||
|
Reference in New Issue
Block a user