completion: improve __git_refs()'s in-code documentation
That "first argument is passed to __gitdir()" statement in particular is not really helpful, and after this series it won't be the case anyway. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor committed
Feb 3, 2017 at 03:48 UTC
be6fbdb5459dcd685b308e49b2855e2f54120e19
1 file changed
+5
-3
contrib/completion/git-completion.bash
+5
-3
@@ -332,9 +332,11 @@ __git_tags ()
332
fi
333
}
334
335
-# __git_refs accepts 0, 1 (to pass to __gitdir), or 2 arguments
336
-# presence of 2nd argument means use the guess heuristic employed
337
-# by checkout for tracking branches
335
+# Lists refs from the local (by default) or from a remote repository.
336
+# It accepts 0, 1 or 2 arguments:
337
+# 1: The remote to list refs from (optional; ignored, if set but empty).
338
+# 2: In addition to local refs, list unique branches from refs/remotes/ for
339
+# 'git checkout's tracking DWIMery (optional; ignored, if set but empty).
340
__git_refs ()
341
{
342
local i hash dir="$(__gitdir "${1-}")" track="${2-}"