Skip to content

Commit

Permalink
Merge branch 'mp/complete-paths'
Browse files Browse the repository at this point in the history
* mp/complete-paths:
  git-completion.bash: zsh does not implement function redirection correctly
  • Loading branch information
Junio C Hamano committed Mar 11, 2013
2 parents c75aa63 + 35ba83c commit f1eba9f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -299,18 +299,24 @@ __git_index_file_list_filter ()
# the second argument.
__git_ls_files_helper ()
{
# NOTE: $2 is not quoted in order to support multiple options
cd "$1" && git ls-files --exclude-standard $2
} 2>/dev/null
(
test -n "${CDPATH+set}" && unset CDPATH
# NOTE: $2 is not quoted in order to support multiple options
cd "$1" && git ls-files --exclude-standard $2
) 2>/dev/null
}


# Execute git diff-index, returning paths relative to the directory
# specified in the first argument, and using the tree object id
# specified in the second argument.
__git_diff_index_helper ()
{
cd "$1" && git diff-index --name-only --relative "$2"
} 2>/dev/null
(
test -n "${CDPATH+set}" && unset CDPATH
cd "$1" && git diff-index --name-only --relative "$2"
) 2>/dev/null
}

# __git_index_files accepts 1 or 2 arguments:
# 1: Options to pass to ls-files (required).
Expand Down

0 comments on commit f1eba9f

Please sign in to comment.