completion: add deprecated __git_complete_file ()
PATCH 1/1 completion: add deprecated __git_complete_file ()
77c130 (completion: clarify ls-tree, archive, show completion, 2013-06-02) removed __git_complete_file () because it had no callers left in the file. However, to avoid breaking user scripts that may depend on this, add it back as a deprecated alias.
---
Based on pu.
contrib/completion/git-completion.bash | 5 +++++ 1 file changed, 5 insertions(+)
contrib/completion/git-completion.bash +5 -0
@@ -489,6 +489,11 @@ __git_complete_revlist_file () esac } +# no callers; deprecated alias +__git_complete_file () +{ + __git_complete_revlist_file +} # __git_complete_index_file requires 1 argument: # 1: the options to pass to ls-file
Signature · 1 line
1.8.3.244.g98dd9db.dirty
Quoted 8 lines · Ramkumar Ramachandra
77c130 (completion: clarify ls-tree, archive, show completion, 2013-06-02) removed
__git_complete_file() because it had no callers left in the file. However, to avoid breaking user scripts that may depend on this, add it back as a deprecated alias.Signed-off-by Ramkumar Ramachandra <[email protected]>---
Based on pu.
Will queue; thanks. With this, I think it will be safe to push the series in question to 'master'.
Quoted 4 lines · Ramkumar Ramachandra
77c130 (completion: clarify ls-tree, archive, show completion, 2013-06-02) removed
__git_complete_file() because it had no callers left in the file. However, to avoid breaking user scripts that may depend on this, add it back as a deprecated alias.
This is fine by me, but at some point we need to decide how we should prefix the functions that are supposed to be used by external scripts.
Also, maybe we should start adding '# TODO remove in v2.0' so we remember to do that in v2.0.
Signature · 1 line
Felipe Contreras
Quoted 2 lines · Felipe Contreras
This is fine by me, but at some point we need to decide how we should prefix the functions that are supposed to be used by external scripts.
Yeah, I thought __ meant "internal" :/
Quoted 2 lines
Also, maybe we should start adding '# TODO remove in v2.0' so we remember to do that in v2.0.
While at it, let's also clean up the deprecated zsh nonsense in git-completion.bash.
Quoted 11 lines · Ramkumar Ramachandra
Quoted 2 lines · Felipe Contreras
This is fine by me, but at some point we need to decide how we should prefix the functions that are supposed to be used by external scripts.
Yeah, I thought __ meant "internal" :/
Quoted 2 lines
Also, maybe we should start adding '# TODO remove in v2.0' so we remember to do that in v2.0.
While at it, let's also clean up the deprecated zsh nonsense in git-completion.bash.
And the _git _gitk compatibility wrappers.
Signature · 1 line
Felipe Contreras
Quoted 7 lines · Junio C Hamano
Quoted 5 lines · Ramkumar Ramachandra
77c130 (completion: clarify ls-tree, archive, show completion, 2013-06-02) removed
__git_complete_file() because it had no callers left in the file. However, to avoid breaking user scripts that may depend on this, add it back as a deprecated alias.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Ramkumar Ramachandra <[email protected]>---
Based on pu.Will queue; thanks. With this, I think it will be safe to push the series in question to 'master'.
Safe? Yes, at least scripts won't break because of the missing function.
However, I still think it would be worth reverting at least the hunks modifying the completion functions of ls-tree and archive. Or better yet, the whole series.
Quoted 8 lines · Felipe Contreras
Quoted 4 lines · Ramkumar Ramachandra
77c130 (completion: clarify ls-tree, archive, show completion, 2013-06-02) removed
__git_complete_file() because it had no callers left in the file. However, to avoid breaking user scripts that may depend on this, add it back as a deprecated alias.This is fine by me, but at some point we need to decide how we should prefix the functions that are supposed to be used by external scripts.
Or rather how we should prefix the functions that are _not_ supposed to be used by external scripts. That way all public functions would retain the "__git" prefix and existing scripts calling only common functions like __git_(heads|git_refs|find_on_cmdline|etc.) would work without modification.
Best,
Gábor