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: "Junio C Hamano" <gitster@pobox.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH] Delete check-racy.c
Date: Fri, 22 Feb 2019 18:27:57 +0700	[thread overview]
Message-ID: <20190222112757.20035-1-pclouds@gmail.com> (raw)

This is git-checy-racy command, added a long time ago [1] and was never
part of the default build. Naturally after some makefile changes [2],
git-check-racy was no longer recognized as a build target. Even if it
compiles to day, it will not link after the introduction of
common-main.c [3].

Racy index has not been a problem for a long time [4].  It's time to let
this code go. I briefly consider if check-racy should be part of
test-tool.  But I don't think it's worth the effort.

[1] 42f774063d (Add check program "git-check-racy" - 2006-08-15)
[2] c373991375 (Makefile: list generated object files in OBJECTS -
    2010-01-26)
[3] 3f2e2297b9 (add an extra level of indirection to main() -
    2016-07-01)
[4] I pretend I don't remember anything about the recent split-index's
    racy problem

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 check-racy.c (gone) | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/check-racy.c b/check-racy.c
deleted file mode 100644
index 24b6542352..0000000000
--- a/check-racy.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "cache.h"
-
-int main(int ac, char **av)
-{
-	int i;
-	int dirty, clean, racy;
-
-	dirty = clean = racy = 0;
-	read_cache();
-	for (i = 0; i < active_nr; i++) {
-		struct cache_entry *ce = active_cache[i];
-		struct stat st;
-
-		if (lstat(ce->name, &st)) {
-			error_errno("lstat(%s)", ce->name);
-			continue;
-		}
-
-		if (ce_match_stat(ce, &st, 0))
-			dirty++;
-		else if (ce_match_stat(ce, &st, CE_MATCH_RACY_IS_DIRTY))
-			racy++;
-		else
-			clean++;
-	}
-	printf("dirty %d, clean %d, racy %d\n", dirty, clean, racy);
-	return 0;
-}
-- 
2.21.0.rc1.337.gdf7f8d0522


             reply	other threads:[~2019-02-22 11:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 11:27 Nguyễn Thái Ngọc Duy [this message]
2019-02-22 23:24 ` [PATCH] Delete check-racy.c Junio C Hamano

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=20190222112757.20035-1-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).