git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Jeff King" <peff@peff.net>, "Junio C Hamano" <gitster@pobox.com>,
	"Jonathon Mah" <me@JonathonMah.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH v3 2/2] cache-tree: remove dead i-t-a code in verify_cache()
Date: Thu, 13 Dec 2012 08:39:07 +0700	[thread overview]
Message-ID: <1355362747-13474-2-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1355362747-13474-1-git-send-email-pclouds@gmail.com>

This code is added in 331fcb5 (git add --intent-to-add: do not let an
empty blob be committed by accident - 2008-11-28) to forbid committing
when i-t-a entries are present. When we allow that, we forgot to
remove this unreachable code.

Noticed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 cache-tree.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/cache-tree.c b/cache-tree.c
index 1fbc81a..3e79e27 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -166,12 +166,8 @@ static int verify_cache(struct cache_entry **cache,
 				fprintf(stderr, "...\n");
 				break;
 			}
-			if (ce_stage(ce))
-				fprintf(stderr, "%s: unmerged (%s)\n",
-					ce->name, sha1_to_hex(ce->sha1));
-			else
-				fprintf(stderr, "%s: not added yet\n",
-					ce->name);
+			fprintf(stderr, "%s: unmerged (%s)\n",
+				ce->name, sha1_to_hex(ce->sha1));
 		}
 	}
 	if (funny)
-- 
1.8.0.rc2.23.g1fb49df

  reply	other threads:[~2012-12-13  1:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-06  8:53 Bug: write-tree corrupts intent-to-add index state Jonathon Mah
2012-11-06 12:37 ` Nguyen Thai Ngoc Duy
2012-11-09 11:04 ` [PATCH] cache-tree: invalidate i-t-a paths after writing trees Nguyễn Thái Ngọc Duy
2012-11-09 11:57   ` Junio C Hamano
2012-11-10 11:04     ` Nguyen Thai Ngoc Duy
2012-11-30  0:06       ` Junio C Hamano
2012-11-30  1:26         ` Nguyen Thai Ngoc Duy
2012-12-08  4:10   ` [PATCH v2] cache-tree: invalidate i-t-a paths after generating trees Nguyễn Thái Ngọc Duy
2012-12-10  6:50     ` Junio C Hamano
2012-12-10 11:53       ` Nguyen Thai Ngoc Duy
2012-12-10 17:22         ` Junio C Hamano
2012-12-13  1:39           ` [PATCH v3 1/2] " Nguyễn Thái Ngọc Duy
2012-12-13  1:39             ` Nguyễn Thái Ngọc Duy [this message]
2012-12-13 18:34               ` [PATCH v3 2/2] cache-tree: remove dead i-t-a code in verify_cache() Junio C Hamano
2012-12-13  2:04             ` [PATCH v3 1/2] cache-tree: invalidate i-t-a paths after generating trees Junio C Hamano
2012-12-15  2:52               ` Nguyen Thai Ngoc Duy

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

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

  git send-email \
    --in-reply-to=1355362747-13474-2-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@JonathonMah.com \
    --cc=peff@peff.net \
    /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.
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).