git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/4] t5600: fix outdated comment about unborn HEAD

From
Jeff King <peff@peff.net>
Date
Jan 2, 2018, 21:08 UTC
Message-ID
<20180102210832.GA22556@sigill.intra.peff.net>
In-Reply-To
<20180102210753.GA10430@sigill.intra.peff.net>

Back when this test was written, git-clone could not handle a repository without any commits. These days it works fine, and this comment is out of date.

At first glance it seems like we could just drop this code entirely now, but it's necessary for the final test, which was added later. That test corrupts the repository by temporarily removing its objects, which means we need to have some objects to move.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t5600-clone-fail-cleanup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh
index 4435693bb2..f23f92e5a7 100755
--- a/t/t5600-clone-fail-cleanup.sh
+++ b/t/t5600-clone-fail-cleanup.sh
@@ -22,7 +22,7 @@ test_expect_success \
 # Need a repo to clone
 test_create_repo foo
 
-# clone doesn't like it if there is no HEAD. Is that a bug?
+# create some objects so that we can corrupt the repo later
 (cd foo && touch file && git add file && git commit -m 'add file' >/dev/null 2>&1)
 
 # source repository given to git clone should be relative to the
-- 
2.16.0.rc0.384.gc477e89267
Previous: Jeff KingNext: Jeff King
Message 5 of 16 in “Git removes existing folder when cancelling clone”
  1. Stephan JanssenJan 2, 2018
  2. Robert P. J. DayJan 2, 2018
  3. Jeff KingJan 2, 2018
  4. 0/4 Git removes existing folder when cancelling cloneJeff King, Jan 2, 2018
  5. 1/4 t5600: fix outdated comment about unborn HEADJeff King, Jan 2, 2018
  6. 2/4 t5600: modernize styleJeff King, Jan 2, 2018
  7. 3/4 clone: factor out dir_exists() helperJeff King, Jan 2, 2018
  8. Junio C HamanoJan 4, 2018
  9. Jeff KingJan 4, 2018
  10. Jeff KingJan 5, 2018
  11. Junio C HamanoJan 5, 2018
  12. 4/4 clone: do not clean up directories we didn't createJeff King, Jan 2, 2018
  13. Eric SunshineJan 2, 2018
  14. Jeff KingJan 2, 2018
  15. Junio C HamanoJan 5, 2018
  16. Junio C HamanoJan 4, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.