zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] __git_commit_objects_prefer_recent: local ret
@ 2015-05-21 17:30 Daniel Hahler
  2015-05-21 18:05 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Hahler @ 2015-05-21 17:30 UTC (permalink / raw)
  To: zsh-workers

From: Daniel Hahler <git@thequod.de>

Without this, `ret` will be set to 1 with `git diff --ex<tab>` and
result in duplicate entries:

   % git diff --ex<tab>
    -- option --
   --exit-code    -- report exit code 1 if differences, 0 otherwise
   --exit-code  -- report exit code 1 if differences, 0 otherwise
   --ext-diff     -- allow external diff helper to be executed
   --ext-diff   -- allow external diff helper to be executed
   --no-ext-diff  -- disallow external diff helper to be executed
    -- recent commit object name --

I am not sure if this is the right way to do it.
---
 Completion/Unix/Command/_git | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index c886cc9..c9f0b72 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5605,6 +5605,7 @@ __git_remote_branch_names_noprefix () {
 
 (( $+functions[__git_commit_objects_prefer_recent] )) ||
 __git_commit_objects_prefer_recent () {
+  local ret  # Keep "ret" local here, used in __git_recent_commits.
   __git_recent_commits || __git_commit_objects
 }
 
-- 
2.4.0.dirty


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

end of thread, other threads:[~2015-05-21 23:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21 17:30 [PATCH] __git_commit_objects_prefer_recent: local ret Daniel Hahler
2015-05-21 18:05 ` Bart Schaefer
2015-05-21 18:37   ` Daniel Hahler
2015-05-21 21:07     ` Bart Schaefer
2015-05-21 23:04       ` Daniel Hahler

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).