{"thread":{"id":"11008","subject":"[PATCH] git-checkout: describe detached head correctly","startedAt":"2007-11-25T18:34:27Z","lastAt":"2007-11-25T18:34:27Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"60843","messageId":"7vprxymax8.fsf@gitster.siamese.dyndns.org","threadId":"11008","inReplyTo":null,"subject":"[PATCH] git-checkout: describe detached head correctly","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-25T18:34:27Z","receivedAt":"2007-11-25T18:34:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When you have a file called HEAD in the work tree, the code to report\nwhere the HEAD is at when \"git checkout $commit^0\" is done triggered\nunnecessary ambiguity checking.  \n\nExplicitly mark the command line with \"--\" and make it clear that we are\ntalking about a revision.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n git-checkout.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-checkout.sh b/git-checkout.sh\nindex 17f4392..93dfb46 100755\n--- a/git-checkout.sh\n+++ b/git-checkout.sh\n@@ -169,7 +169,7 @@ detach_warn=\n describe_detached_head () {\n \ttest -n \"$quiet\" || {\n \t\tprintf >&2 \"$1 \"\n-\t\tGIT_PAGER= git log >&2 -1 --pretty=oneline --abbrev-commit \"$2\"\n+\t\tGIT_PAGER= git log >&2 -1 --pretty=oneline --abbrev-commit \"$2\" --\n \t}\n }\n \n"}]}