On Mon, 8 Jul 2013 11:41:09 -0700 (PDT)
Andy From <andyf...@gmail.com> wrote:
> I wonder if there's been any work on providing SHA-1 tab completion
> for any command (e.g. show or diff) ?
> Completion works fine for e.g. branches but it might be a convenience
> feature to also be able to complete on SHA-1.
> Maybe there would be some performance drawbacks on this and there's
> been some discussion on this already...
> BR, A
There could be major performance drawbacks, memory problems and just
the shear amount that will be displayed.
Completion works on the principal of getting all potential completions
in memory and then showing them.
So for example with branches,
git checkout b<TAB><TAB>
All branches that start with b are loaded in memory and displayed.
Now imagine this with all your commits.
Do a git rev-list|wc -l on your repository and see how long it takes
and how many commits you have.
For the kernel repo for example:
$time git rev-list --all | wc -l
So 419811 possibilities would be displayed after you do git
Assume you know the SHA1 starts with e
$time git rev-list --all | grep ^e | wc -l
26365 possibilities on git diff e<TAB><TAB>
Peter van der Does
GPG key: CB317D6E
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/groups/opt_out.