git-completion.bash: silence "not a valid object" errors
[git.git] / contrib / completion / git-completion.bash
index 2e1b5e14b92fe61e02df94ab165c8aab6c06c9cb..6312e3d8eb83e0f793ce11d40c75a35cb6fe1914 100755 (executable)
@@ -676,7 +676,7 @@ __git_complete_revlist_file ()
                *)   pfx="$ref:$pfx" ;;
                esac
 
-               __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
+               __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" 2>/dev/null \
                                | sed '/^100... blob /{
                                           s,^.*        ,,
                                           s,$, ,