Marc Khouzam wrote:
The uniq program only works with sorted input.  The man page states
"uniq prints the unique lines in a sorted file".
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -321,7 +321,7 @@ __git_refs ()
                               if [[ "$ref" == "$cur"* ]]; then
                                       echo "$ref"
-                       done | uniq -u
+                       done | sort | uniq -u

Is 'sort -u' not universally available and sufficient here? It is POSIX at least:

Bye, Jojo

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to