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

Re: Scripted clone generating an incomplete, unusable .git/config

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 11, 2010, 17:32 UTC
Message-ID
<20101111173253.GC16972@burratino>
In-Reply-To
<AANLkTinzotA4TSjMjjmW--gw7ST3dXMyHzPveGynaVmZ@mail.gmail.com>
On Thu, Nov 11, 2010 at 07:16:27PM +0700, Nguyen Thai Ngoc Duy wrote:
> On Thu, Nov 11, 2010 at 5:37 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> Most likely the clone is terminating when Python exits, perhaps due to
>> SIGPIPE.  It doesn't look like a bug to me; I suspect you meant to use
>> os.system(), which is synchronous, instead.
[...]
> If "git clone" is terminated before it completes, shouldn't it clean
> the uncompleted repo?
Ah, so it should.
 trace: built-in: git clone jrn@localhost:/home/jrn/src/xz
 trace: run_command: ssh jrn@localhost git-upload-pack '/home/jrn/src/xz'
 trace: remove junk called
 jrn@localhosts password: 
 trace: run_command: index-pack --stdin -v --fix-thin --keep=fetch-pack 19314 on burratino
 trace: exec: git index-pack --stdin -v --fix-thin --keep=fetch-pack 19314 on burratino
 trace: built-in: git index-pack --stdin -v --fix-thin --keep=fetch-pack 19314 on burratino
 remote: Counting objects: 7299, done.
 remote: Compressing objects: 100% (1826/1826), done.
 remote: Total 7299 (delta 5421), reused 7274 (delta 5401)
 Receiving objects: 100% (7299/7299), 2.36 MiB | 4.43 MiB/s, done.
 Resolving deltas: 100% (5421/5421), done.
 trace: exited with status 0
 trace: exited with status 0
 trace: remove junk called
 trace: remove_junk: pid != 0
Are there any downside to the following?
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
diff --git a/builtin/clone.c b/builtin/clone.c
index 19ed640..af6b40a 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -667,6 +667,5 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 	strbuf_release(&branch_top);
 	strbuf_release(&key);
 	strbuf_release(&value);
-	junk_pid = 0;
 	return err;
 }
Previous: Nguyen Thai Ngoc DuyNext: Daniel Barkalow
Message 6 of 17 in “Scripted clone generating an incomplete, unusable .git/config”
  1. Dun PealNov 10, 2010
  2. Stefan NaeweNov 11, 2010
  3. Stefan NaeweNov 11, 2010
  4. Jonathan NiederNov 11, 2010
  5. Nguyen Thai Ngoc DuyNov 11, 2010
  6. Jonathan NiederNov 11, 2010
  7. Daniel BarkalowNov 11, 2010
  8. Jonathan NiederNov 11, 2010
  9. Jeff KingNov 11, 2010
  10. Jonathan NiederNov 12, 2010
  11. Jeff KingNov 12, 2010
  12. Jonathan NiederNov 12, 2010
  13. Jonathan NiederNov 12, 2010
  14. Jeff KingNov 12, 2010
  15. Jonathan NiederNov 12, 2010
  16. daemon, tag, verify-tag: do not pass ignored signals to child (Re: Scripted clone generating an incomplete, unusable .git/config)Jonathan Nieder, Nov 12, 2010
  17. Andreas SchwabNov 11, 2010

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.