* Possible bug in --short option of git-rev-list
@ 2007-04-21 9:32 Marco Costalba
2007-04-21 9:34 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Marco Costalba @ 2007-04-21 9:32 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamamo
>From git tree
$ git rev-parse v1.5.1.1 HEAD
c5ec6d00eb063f547e314fdf8a1d8cf09472da6b
744747ef1d75c85fb3a1785cb08d36497128d3d3
$ git rev-parse --short v1.5.1.1 HEAD
c5ec6d0
744747e
fatal: Needed a single revision
$
Output is correct, but at the end an (bogus?) error is reported an
git-rev-parse command exits with error code.
Marco
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Possible bug in --short option of git-rev-list
2007-04-21 9:32 Possible bug in --short option of git-rev-list Marco Costalba
@ 2007-04-21 9:34 ` Junio C Hamano
2007-04-21 10:03 ` Marco Costalba
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2007-04-21 9:34 UTC (permalink / raw)
To: Marco Costalba; +Cc: Git Mailing List, Junio C Hamamo
"Marco Costalba" <mcostalba@gmail.com> writes:
> From git tree
>
> $ git rev-parse v1.5.1.1 HEAD
> c5ec6d00eb063f547e314fdf8a1d8cf09472da6b
> 744747ef1d75c85fb3a1785cb08d36497128d3d3
> $ git rev-parse --short v1.5.1.1 HEAD
> c5ec6d0
> 744747e
> fatal: Needed a single revision
> $
>
> Output is correct, but at the end an (bogus?) error is reported an
> git-rev-parse command exits with error code.
Short is abbrev + verify. This is not new.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Possible bug in --short option of git-rev-list
2007-04-21 9:34 ` Junio C Hamano
@ 2007-04-21 10:03 ` Marco Costalba
0 siblings, 0 replies; 3+ messages in thread
From: Marco Costalba @ 2007-04-21 10:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-21 10:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-21 9:32 Possible bug in --short option of git-rev-list Marco Costalba
2007-04-21 9:34 ` Junio C Hamano
2007-04-21 10:03 ` Marco Costalba
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).