zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _git: offer changed files relative to current directory
@ 2009-12-05  0:32 Alexey I. Froloff
  2009-12-05 12:07 ` Štěpán Němec
  0 siblings, 1 reply; 23+ messages in thread
From: Alexey I. Froloff @ 2009-12-05  0:32 UTC (permalink / raw)
  To: Zsh list; +Cc: Alexey I. Froloff

__git_changed_files() behavior should match git-commit, pass --relative
to git-diff-index then looking for changed files.

Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
---
 Completion/Unix/Command/_git |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e483133..dd3617b 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2826,7 +2826,7 @@ __git_unmerged_files () {
 __git_changed_files () {
   local -a files
 
-  files=(${(ps:\0:)"$(_call_program files git diff-index -z --name-only --no-color HEAD 2>/dev/null)"})
+  files=(${(ps:\0:)"$(_call_program files git diff-index -z --name-only --no-color --relative HEAD 2>/dev/null)"})
   __git_command_successful || return
 
   _wanted files expl 'index file' _multi_parts $@ - / files
-- 
1.6.5.3


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-12-14 13:29 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-05  0:32 [PATCH] _git: offer changed files relative to current directory Alexey I. Froloff
2009-12-05 12:07 ` Štěpán Němec
2009-12-05 12:42   ` Alexey I. Froloff
2009-12-05 15:12     ` Alexey I. Froloff
2009-12-05 17:00       ` Štěpán Němec
2009-12-05 17:45         ` Alexey I. Froloff
2009-12-06 21:52           ` [PATCH] _git: offer " Alexey I. Froloff
2009-12-07 22:40             ` Alexey I. Froloff
2009-12-08 10:48               ` Štěpán Němec
2009-12-08 10:50                 ` Nikolai Weibull
2009-12-08 11:37                   ` Štěpán Němec
2009-12-08 11:45                     ` Mikael Magnusson
2009-12-08 11:22                 ` Alexey I. Froloff
2009-12-08 11:39                   ` Štěpán Němec
2009-12-08 12:07                     ` Alexey I. Froloff
2009-12-13  0:08             ` Alexey I. Froloff
2009-12-13 21:33               ` Peter Stephenson
2009-12-13 22:16                 ` Nikolai Weibull
2009-12-13 22:22                 ` Štěpán Němec
2009-12-14 13:20                 ` Jörg Sommer
2009-12-08 12:08         ` [PATCH] _git: offer changed " Alexey I. Froloff
2009-12-08 13:20           ` Štěpán Němec
2009-12-08 13:30             ` Alexey I. Froloff

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).