Ramkumar Ramachandra <artag...@gmail.com> writes:
> Currently, the 'git ls-tree', 'git archive', and 'git show' completions
> use __git_complete_file (aliased to __git_complete_revlist_file).
> In the case of 'git ls-tree' and 'git archive', they necessarily require
> a tree-ish argument (and optionally a pathspec filter, or "file
> $ git ls-tree hot-branch git.c
> $ git archive HEAD~4 git.c
> So, __git_complete_file is a misleading name.
> In the case of 'git show', it can take a pathspec and default the
> revision to HEAD like:
> $ git show git.c
> (which is useful if git.c was modified in HEAD)
> However, this usage is not idiomatic at all.
More idiomatic is after seeing "git show --stat" doing "git show dir/".
But I do not think it really matters.
Just like "diff" and "difftool", "show" optionally takes revs and
paths, and because the current completion code does not do anything
fancy like "we have seen enough revs and there will appear no revs
hence we only complete paths from here on", complete_revlist_file is
the right helper to use for all of them.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html