Completion must sort before using uniq
[gitweb.git] / contrib / completion / git-completion.bash
index be800e09bdf0656951c415105e0d32ce0b0edf9e..48c3abdf987f0843b7886372a374be19a669398d 100644 (file)
@@ -321,7 +321,7 @@ __git_refs ()
                                if [[ "$ref" == "$cur"* ]]; then
                                        echo "$ref"
                                fi
-                       done | uniq -u
+                       done | sort | uniq -u
                fi
                return
        fi