{"thread":{"id":"7765","subject":"Possible bug in --short option of git-rev-list","startedAt":"2007-04-21T09:32:14Z","lastAt":"2007-04-21T10:03:38Z","messageCount":3,"participants":["Marco Costalba","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"40033","messageId":"e5bfff550704210232v7a214aa7jc5f55fe26edbf8e3@mail.gmail.com","threadId":"7765","inReplyTo":null,"subject":"Possible bug in --short option of git-rev-list","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2007-04-21T09:32:14Z","receivedAt":"2007-04-21T09:32:14Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":">From git tree\n\n$ git rev-parse v1.5.1.1 HEAD\nc5ec6d00eb063f547e314fdf8a1d8cf09472da6b\n744747ef1d75c85fb3a1785cb08d36497128d3d3\n$ git rev-parse --short v1.5.1.1 HEAD\nc5ec6d0\n744747e\nfatal: Needed a single revision\n$\n\nOutput is correct, but at the end an (bogus?) error is reported an\ngit-rev-parse command exits with error code.\n\nMarco\n"},{"id":"40034","messageId":"7vps5yul49.fsf@assigned-by-dhcp.cox.net","threadId":"7765","inReplyTo":"e5bfff550704210232v7a214aa7jc5f55fe26edbf8e3@mail.gmail.com","subject":"Re: Possible bug in --short option of git-rev-list","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-21T09:34:14Z","receivedAt":"2007-04-21T09:34:14Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Marco Costalba\" <mcostalba@gmail.com> writes:\n\n> From git tree\n>\n> $ git rev-parse v1.5.1.1 HEAD\n> c5ec6d00eb063f547e314fdf8a1d8cf09472da6b\n> 744747ef1d75c85fb3a1785cb08d36497128d3d3\n> $ git rev-parse --short v1.5.1.1 HEAD\n> c5ec6d0\n> 744747e\n> fatal: Needed a single revision\n> $\n>\n> Output is correct, but at the end an (bogus?) error is reported an\n> git-rev-parse command exits with error code.\n\nShort is abbrev + verify.  This is not new.\n"},{"id":"40037","messageId":"e5bfff550704210303u195c6c3cub0df34b5e862a0c5@mail.gmail.com","threadId":"7765","inReplyTo":"7vps5yul49.fsf@assigned-by-dhcp.cox.net","subject":"Re: Possible bug in --short option of git-rev-list","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2007-04-21T10:03:38Z","receivedAt":"2007-04-21T10:03:38Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On 4/21/07, Junio C Hamano <junkio@cox.net> wrote:\n>\n> Short is abbrev + verify.  This is not new.\n>\n\nIn my implementation I pass command line arguments first to\ngit-rev-parse, and the output of git-rev-parse is then used to feed\ngit-rev-list, that starts loading of revisions.\n\nThe problem I found is that output of git-rev-parse could be veeery\nlong, as example in git tree:\n\n$ git rev-parse --all | wc\n    144     144    5904\n\nWhen running qgit --all on a repo with hundreds of tags this could\nlead to very long command line arguments for git-rev-list so to break\nplatform limits. One idea to *hide* this problem was to get only the\nshort version of a sha so to go from 40 to 7 chars and reduce command\nline size of about 6 times.\n\nOf course the *real* solution would be to pass qgit command line\narguments directly to git-rev-list and skip git-rev-parse altogether.\n\nMy question is: In case I skip git-rev-parse and feed directly\ngit-rev-list with command line arguments, there is some compatibility\nbreak in current behaviour? In other words there are some command line\narguments 'args' for whom\n\n                              git-rev-list args != git rev-parse args\n| git rev-list\n\n\nThanks\nMarco\n"}]}