From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12211 invoked by alias); 21 May 2015 17:30:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35256 Received: (qmail 7983 invoked from network); 21 May 2015 17:30:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= x-mailer:message-id:date:date:subject:subject:from:from:received :received:received; s=postfix2; t=1432229453; bh=PQsbM5b6/1FJ8wk 19TKlbf7evVSM8m3SvsUVDffI91c=; b=uMb3Nn05xV9EQfZ9oskQRJw1j0pLzB/ TcuMXTHuSfbYtqnMaMheaL850WfX7bUd0Oks5XQAiswn8jed+KmNltv1qglG/tUm TLB8f/hZp4E2fsYL0fmfXbq/lifIfmgGd5CaEnyt7MzqDgfRqhXqwYEDi7DSROOG sNbnF0DlvSP8= From: Daniel Hahler To: zsh-workers@zsh.org Subject: [PATCH] __git_commit_objects_prefer_recent: local ret Date: Thu, 21 May 2015 19:30:50 +0200 Message-Id: <1432229450-21417-1-git-send-email-genml+zsh-workers@thequod.de> X-Mailer: git-send-email 2.4.0.dirty From: Daniel Hahler Without this, `ret` will be set to 1 with `git diff --ex` and result in duplicate entries: % git diff --ex -- 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