git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: <git@vger.kernel.org>
Cc: Michael Haggerty <mhagger@alum.mit.edu>
Subject: [PATCH 1/3] merge-recursive: remove dead conditional in update_stages()
Date: Sun, 7 Jul 2013 20:02:38 +0200	[thread overview]
Message-ID: <ed085382b2966c91b59234537564e881ea9e6e4d.1373219466.git.trast@inf.ethz.ch> (raw)
In-Reply-To: <cover.1373219466.git.trast@inf.ethz.ch>

650467c (merge-recursive: Consolidate different update_stages
functions, 2011-08-11) changed the former argument 'clear' to always
be true.  Remove the useless conditional.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
---
 merge-recursive.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/merge-recursive.c b/merge-recursive.c
index ea9dbd3..0b9cafb 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -544,11 +544,9 @@ static int update_stages(const char *path, const struct diff_filespec *o,
 	 * would_lose_untracked).  Instead, reverse the order of the calls
 	 * (executing update_file first and then update_stages).
 	 */
-	int clear = 1;
 	int options = ADD_CACHE_OK_TO_ADD | ADD_CACHE_SKIP_DFCHECK;
-	if (clear)
-		if (remove_file_from_cache(path))
-			return -1;
+	if (remove_file_from_cache(path))
+		return -1;
 	if (o)
 		if (add_cacheinfo(o->mode, o->sha1, path, 1, 0, options))
 			return -1;
-- 
1.8.3.2.908.gbd0dbd0

  reply	other threads:[~2013-07-07 18:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-07 18:02 [PATCH 0/3] merge -Xindex-only Thomas Rast
2013-07-07 18:02 ` Thomas Rast [this message]
2013-07-07 18:02 ` [PATCH 2/3] merge-recursive: untangle double meaning of o->call_depth Thomas Rast
2013-07-07 18:37   ` Junio C Hamano
2013-07-07 18:02 ` [PATCH 3/3] merge-recursive: -Xindex-only to leave worktree unchanged Thomas Rast
2013-07-08 15:21 ` [PATCH 0/3] merge -Xindex-only Michael Haggerty
2013-07-08 15:44   ` Thomas Rast
2013-07-09  9:44     ` Michael Haggerty
2013-07-09 12:08       ` Thomas Rast
2013-07-09 19:38         ` Michael Haggerty
2013-07-09 20:01           ` Thomas Rast
2013-10-26 14:40             ` Thomas Rast
2013-10-26 14:43               ` [PATCH 1/3] merge-recursive: remove dead conditional in update_stages() Thomas Rast
2013-10-26 14:43                 ` [PATCH 2/3] merge-recursive: internal flag to avoid touching the worktree Thomas Rast
2013-10-26 14:43                 ` [PATCH 3/3] merge-recursive: -Xindex-only to leave worktree unchanged Thomas Rast

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=ed085382b2966c91b59234537564e881ea9e6e4d.1373219466.git.trast@inf.ethz.ch \
    --to=trast@inf.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    /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).