{"thread":{"id":"50559","subject":"[PATCH] Delete check-racy.c","startedAt":"2019-02-22T11:28:09Z","lastAt":"2019-02-22T23:24:51Z","messageCount":2,"participants":["Nguyễn Thái Ngọc Duy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"369904","messageId":"20190222112757.20035-1-pclouds@gmail.com","threadId":"50559","inReplyTo":null,"subject":"[PATCH] Delete check-racy.c","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2019-02-22T11:27:57Z","receivedAt":"2019-02-22T11:28:09Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"This is git-checy-racy command, added a long time ago [1] and was never\npart of the default build. Naturally after some makefile changes [2],\ngit-check-racy was no longer recognized as a build target. Even if it\ncompiles to day, it will not link after the introduction of\ncommon-main.c [3].\n\nRacy index has not been a problem for a long time [4].  It's time to let\nthis code go. I briefly consider if check-racy should be part of\ntest-tool.  But I don't think it's worth the effort.\n\n[1] 42f774063d (Add check program \"git-check-racy\" - 2006-08-15)\n[2] c373991375 (Makefile: list generated object files in OBJECTS -\n    2010-01-26)\n[3] 3f2e2297b9 (add an extra level of indirection to main() -\n    2016-07-01)\n[4] I pretend I don't remember anything about the recent split-index's\n    racy problem\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n check-racy.c (gone) | 28 ----------------------------\n 1 file changed, 28 deletions(-)\n\ndiff --git a/check-racy.c b/check-racy.c\ndeleted file mode 100644\nindex 24b6542352..0000000000\n--- a/check-racy.c\n+++ /dev/null\n@@ -1,28 +0,0 @@\n-#include \"cache.h\"\n-\n-int main(int ac, char **av)\n-{\n-\tint i;\n-\tint dirty, clean, racy;\n-\n-\tdirty = clean = racy = 0;\n-\tread_cache();\n-\tfor (i = 0; i < active_nr; i++) {\n-\t\tstruct cache_entry *ce = active_cache[i];\n-\t\tstruct stat st;\n-\n-\t\tif (lstat(ce->name, &st)) {\n-\t\t\terror_errno(\"lstat(%s)\", ce->name);\n-\t\t\tcontinue;\n-\t\t}\n-\n-\t\tif (ce_match_stat(ce, &st, 0))\n-\t\t\tdirty++;\n-\t\telse if (ce_match_stat(ce, &st, CE_MATCH_RACY_IS_DIRTY))\n-\t\t\tracy++;\n-\t\telse\n-\t\t\tclean++;\n-\t}\n-\tprintf(\"dirty %d, clean %d, racy %d\\n\", dirty, clean, racy);\n-\treturn 0;\n-}\n-- \n2.21.0.rc1.337.gdf7f8d0522\n\n"},{"id":"370002","messageId":"xmqqmumno18g.fsf@gitster-ct.c.googlers.com","threadId":"50559","inReplyTo":"20190222112757.20035-1-pclouds@gmail.com","subject":"Re: [PATCH] Delete check-racy.c","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-02-22T23:24:47Z","receivedAt":"2019-02-22T23:24:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:\n\n> This is git-checy-racy command, added a long time ago [1] and was never\n> part of the default build. Naturally after some makefile changes [2],\n> git-check-racy was no longer recognized as a build target. Even if it\n> compiles to day, it will not link after the introduction of\n> common-main.c [3].\n>\n> Racy index has not been a problem for a long time [4].  It's time to let\n> this code go. I briefly consider if check-racy should be part of\n> test-tool.  But I don't think it's worth the effort.\n>\n> [1] 42f774063d (Add check program \"git-check-racy\" - 2006-08-15)\n> [2] c373991375 (Makefile: list generated object files in OBJECTS -\n>     2010-01-26)\n> [3] 3f2e2297b9 (add an extra level of indirection to main() -\n>     2016-07-01)\n> [4] I pretend I don't remember anything about the recent split-index's\n>     racy problem\n>\n> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n> ---\n>  check-racy.c (gone) | 28 ----------------------------\n>  1 file changed, 28 deletions(-)\n\nNice.\n"}]}