Skip to content

Commit

Permalink
completion: show can take both revlist and paths
Browse files Browse the repository at this point in the history
The 'git show' completion uses __git_complete_file (aliased to
__git_complete_revlist_file), because accepts <tree-ish>:<path> as
well as <commit-ish>.  But the command also accepts range of commits
in A..B notation, so using __git_complete_revlist_file is more
appropriate.

There still remain two users of __git_complete_file, completions for
"archive" and "ls-tree".  As these commands do not take range
notation, and "git show" no longer uses __git_complete_file, the
implementation of it can be updated not to complete ranges, but that
is a separate topic.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ramkumar Ramachandra authored and Junio C Hamano committed Jun 9, 2013
1 parent d8517cc commit 5269f7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,7 @@ _git_show ()
return
;;
esac
__git_complete_file
__git_complete_revlist_file
}

_git_show_branch ()
Expand Down

0 comments on commit 5269f7f

Please sign in to comment.