{"thread":{"id":"23702","subject":"Bizarre behavior on git commit","startedAt":"2010-05-05T05:46:07Z","lastAt":"2010-05-06T04:57:26Z","messageCount":6,"participants":["Dan Loewenherz","Jonathan Nieder","Matthieu Moy","Chris Packham"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"140966","messageId":"s2t6f5a4e781005042246sb9ef3d48j134b22b5b41133ed@mail.gmail.com","threadId":"23702","inReplyTo":null,"subject":"Bizarre behavior on git commit","fromName":"Dan Loewenherz","fromEmail":"dloewenherz@gmail.com","sentAt":"2010-05-05T05:46:07Z","receivedAt":"2010-05-05T05:46:07Z","isPatch":false,"sender":{"key":"dloewenherz@gmail.com","avatar":"https://gravatar.com/avatar/69134b10dc6663fd8a4ac95edc0e556662c43c3acb226cec9f697cb8848198b2?d=mp&s=160"},"body":"I'm running into a weird issue in a specific repo where \"git show-ref\"\nusage is being displayed after invocating \"git commit\".\n\nE.g.\n$ git commit -m \"my commit message\"\nusage: git show-ref [-q|--quiet] [--verify] [--head]\n[-d|--dereference] [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags]\n[--heads] [--] [pattern*]\n   or: git show-ref --exclude-existing[=pattern] < ref-list\n\n    --tags                only show tags (can be combined with heads)\n    --heads               only show heads (can be combined with tags)\n    --verify              stricter reference checking, requires exact ref path\n    --head                show the HEAD reference\n    -d, --dereference     dereference tags into object IDs\n    -s, --hash[=<n>]      only show SHA1 hash using <n> digits\n    --abbrev[=<n>]        use <n> digits to display SHA-1s\n    -q, --quiet           be quiet\n    --exclude-existing[=<pattern>]\n                          show refs from stdin that aren't in local repository\n\n[master 28a735f] my commit message\n 1 files changed, 2 insertions(+), 0 deletions(-)\n$\n\nThis happens for every commit in this repository. I looked through the\ngit source and failed to find any reference to git show-ref (or\nanything related to it) in buildin/commit.c. I gave up my search in\nhope that someone on the git list would have a better idea. I'm\nrunning version 1.7.0.3.311.g6a6955.\n\n-Dan\n"},{"id":"140967","messageId":"20100505060110.GA21260@progeny.tock","threadId":"23702","inReplyTo":"s2t6f5a4e781005042246sb9ef3d48j134b22b5b41133ed@mail.gmail.com","subject":"Re: Bizarre behavior on git commit","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-05-05T06:01:10Z","receivedAt":"2010-05-05T06:01:10Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Dan Loewenherz wrote:\n\n> I'm running into a weird issue in a specific repo where \"git show-ref\"\n> usage is being displayed after invocating \"git commit\".\n> \n> E.g.\n> $ git commit -m \"my commit message\"\n> usage: git show-ref [-q|--quiet] [--verify] [--head]\n[...]\n>                           show refs from stdin that aren't in local repository\n> \n> [master 28a735f] my commit message\n>  1 files changed, 2 insertions(+), 0 deletions(-)\n> $\n\nStrange.  Maybe a hook script?\n\n  GIT_TRACE=1 git commit -m \"my commit message\"\n\nshould reveal the culprit, I hope.\n\nHope that helps,\nJonathan\n"},{"id":"140977","messageId":"vpqd3xa4q7z.fsf@bauges.imag.fr","threadId":"23702","inReplyTo":"20100505060110.GA21260@progeny.tock","subject":"Re: Bizarre behavior on git commit","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-05-05T10:06:56Z","receivedAt":"2010-05-05T10:06:56Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Strange.  Maybe a hook script?\n>\n>   GIT_TRACE=1 git commit -m \"my commit message\"\n>\n> should reveal the culprit, I hope.\n\nIf it doesn't, playing with \"strace\" may help (like:\nstrace -f -e clone,execve git commit -m foobar ).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"141001","messageId":"t2ga038bef51005050952u3370cf68pa45496e56a4adb7b@mail.gmail.com","threadId":"23702","inReplyTo":"s2t6f5a4e781005042246sb9ef3d48j134b22b5b41133ed@mail.gmail.com","subject":"Re: Bizarre behavior on git commit","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-05-05T16:52:31Z","receivedAt":"2010-05-05T16:52:31Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Hi,\n\nOn Tue, May 4, 2010 at 10:46 PM, Dan Loewenherz <dloewenherz@gmail.com> wrote:\n> I'm running into a weird issue in a specific repo where \"git show-ref\"\n> usage is being displayed after invocating \"git commit\".\n>\n> E.g.\n> $ git commit -m \"my commit message\"\n> usage: git show-ref [-q|--quiet] [--verify] [--head]\n> ...\n\nThis may or may not be the case for you but I did have a bit of a\nface-palm issue a while back because I was tinkering with a __git_ps1\nbash script and forgot. I was actually getting output from one git\ncommand or another and couldn't figure out why until I eventually\nfigured out that the commands that were complaining were used in my\n__git_ps1 script. This was mainly when I was doing slightly unexpected\nthings (at least as far as __git_ps1 was concerned, e.g during an\ninteractive rebase ).\n\nIts probably not your problem but just double check with 'echo \"$PS1\"'\nfrom your shell.\n"},{"id":"141023","messageId":"n2m6f5a4e781005052032sf47733ebwf490e0369bebd03f@mail.gmail.com","threadId":"23702","inReplyTo":"20100505060110.GA21260@progeny.tock","subject":"Re: Bizarre behavior on git commit","fromName":"Dan Loewenherz","fromEmail":"dloewenherz@gmail.com","sentAt":"2010-05-06T03:32:35Z","receivedAt":"2010-05-06T03:32:35Z","isPatch":false,"sender":{"key":"dloewenherz@gmail.com","avatar":"https://gravatar.com/avatar/69134b10dc6663fd8a4ac95edc0e556662c43c3acb226cec9f697cb8848198b2?d=mp&s=160"},"body":"On Tue, May 4, 2010 at 11:01 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Dan Loewenherz wrote:\n>\n>> I'm running into a weird issue in a specific repo where \"git show-ref\"\n>> usage is being displayed after invocating \"git commit\".\n>>\n>> E.g.\n>> $ git commit -m \"my commit message\"\n>> usage: git show-ref [-q|--quiet] [--verify] [--head]\n> [...]\n>>                           show refs from stdin that aren't in local repository\n>>\n>> [master 28a735f] my commit message\n>>  1 files changed, 2 insertions(+), 0 deletions(-)\n>> $\n>\n> Strange.  Maybe a hook script?\n\nThe GIT_TRACE helped--it was a hook script. The script's been in my\nlocal repo for quite a while, strange that it only started having this\nbehavior recently. Removed the script and all works normally.\n\nThanks for the suggestion!\n\n-Dan\n"},{"id":"141025","messageId":"20100506045726.GA27055@progeny.tock","threadId":"23702","inReplyTo":"n2m6f5a4e781005052032sf47733ebwf490e0369bebd03f@mail.gmail.com","subject":"Re: Bizarre behavior on git commit","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-05-06T04:57:26Z","receivedAt":"2010-05-06T04:57:26Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Dan Loewenherz wrote:\n>> Dan Loewenherz wrote:\n\n>>> $ git commit -m \"my commit message\"\n>>> usage: git show-ref [-q|--quiet] [--verify] [--head]\n[...]\n> The GIT_TRACE helped--it was a hook script. The script's been in my\n> local repo for quite a while, strange that it only started having this\n> behavior recently.\n\nMy bad.\n\n$ git show -s v1.6.6-rc0~34^2~17\n[...]\n    Does anybody use \"show-ref -h\"?  It was in Linus's original, most\n    likely only because \"it might be handy\", not because \"the command\n    should not show the HEAD by default for such and such reasons\".\n    So I think it is okay if \"show-ref -h\" (but not \"show-ref\n    --head\") gives help and exits.\n    \n    If a current script uses \"git show-ref -h\" without any other\n    arguments, it would have to be adapted by changing \"-h\" to\n    \"--head\".\n    \n    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\nI was too dense to notice the connection until just now.\n\n> Removed the script and all works normally.\n\nIf you still have the script, I would be happy to look it over, for\ncuriosity’s sake.\n\nCheers,\nJonathan\n"}]}