git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sebastian Schuberth <sschuberth@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] submodule: remove a superfluous second check for the "new" variable
Date: Mon, 17 Apr 2017 07:59:47 +0000	[thread overview]
Message-ID: <0102015b7aecbf67-2f63e58b-5f75-4c9b-975f-e8e35176d510-000000@eu-west-1.amazonses.com> (raw)

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
---
 submodule.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/submodule.c b/submodule.c
index c52d663..68623bd 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1396,8 +1396,7 @@ int submodule_move_head(const char *path,
 			cp1.no_stdin = 1;
 			cp1.dir = path;
 
-			argv_array_pushl(&cp1.args, "update-ref", "HEAD",
-					 new ? new : EMPTY_TREE_SHA1_HEX, NULL);
+			argv_array_pushl(&cp1.args, "update-ref", "HEAD", new, NULL);
 
 			if (run_command(&cp1)) {
 				ret = -1;

--
https://github.com/git/git/pull/345

             reply	other threads:[~2017-04-17  7:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17  7:59 Sebastian Schuberth [this message]
2017-04-17 18:02 ` [PATCH] submodule: remove a superfluous second check for the "new" variable Stefan Beller
2017-04-17 18:21   ` Sebastian Schuberth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0102015b7aecbf67-2f63e58b-5f75-4c9b-975f-e8e35176d510-000000@eu-west-1.amazonses.com \
    --to=sschuberth@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).