git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Possible bug in --short option of git-rev-list

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Apr 21, 2007, 10:03 UTC
Message-ID
<e5bfff550704210303u195c6c3cub0df34b5e862a0c5@mail.gmail.com>
In-Reply-To
<7vps5yul49.fsf@assigned-by-dhcp.cox.net>
On 4/21/07, Junio C Hamano <junkio@cox.net> wrote:
>
> Short is abbrev + verify.  This is not new.
>

In my implementation I pass command line arguments first to git-rev-parse, and the output of git-rev-parse is then used to feed git-rev-list, that starts loading of revisions.

The problem I found is that output of git-rev-parse could be veeery long, as example in git tree:

$ git rev-parse --all | wc
    144     144    5904

When running qgit --all on a repo with hundreds of tags this could lead to very long command line arguments for git-rev-list so to break platform limits. One idea to *hide* this problem was to get only the short version of a sha so to go from 40 to 7 chars and reduce command line size of about 6 times.

Of course the *real* solution would be to pass qgit command line arguments directly to git-rev-list and skip git-rev-parse altogether.

My question is: In case I skip git-rev-parse and feed directly git-rev-list with command line arguments, there is some compatibility break in current behaviour? In other words there are some command line arguments 'args' for whom

                              git-rev-list args != git rev-parse args
| git rev-list

Thanks Marco

Previous: Junio C Hamano
Message 3 of 3 in “Possible bug in --short option of git-rev-list”
  1. Marco CostalbaApr 21, 2007
  2. Junio C HamanoApr 21, 2007
  3. Marco CostalbaApr 21, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.