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

Making git-clone clean up when it fails

From
Carl Worth <cworth@cworth.org>
Date
Feb 17, 2006, 21:33 UTC
Message-ID
<11402120031687-git-send-email-cworth@cworth.org>

So instead of just making noise, I'll start actually contributing to git. The first patch here is designed to fix the annoying bug that when git-clone fails it still leaves the created directory around, (so that a subsequent git-clone will be guaranteed to fail since the directory already exists).

The second and third patches provide a new test case for the new behavior. I had to guess at the number for the new test, since the distinction of the various numbers in t/README was too vague for me to know where a git-clone test should go. Feel free to adjust that as you might see fit.

-Carl
-- 
cworth@redhat.com
Next: Carl Worth
Message 1 of 4 in “Making git-clone clean up when it fails”
  1. Carl WorthFeb 17, 2006
  2. 1/3 Trap exit to clean up created directory if clone fails.Carl Worth, Feb 17, 2006
  3. 2/3 Abstract test_create_repo out for use in tests.Carl Worth, Feb 17, 2006
  4. 3/3 New test to verify that when git-clone fails it cleans up the new directory.Carl Worth, Feb 17, 2006

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.