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

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

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Nov 11, 2010, 17:39 UTC
Message-ID
<m2eiarwyip.fsf@igel.home>
In-Reply-To
<20101111103742.GA16422@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 18 quoted lines
> Hi,
>
> Dun Peal wrote:
>
>>   $ python -c "import os; os.popen('git clone git@git.domain.com:repos/repo.git')"
>>   [...]
>>   $ cat repo/.git/config
>>   [branch "master"]
>>           remote = origin
>>           merge = refs/heads/master
>
> It looks like you've probably figured it out already, but for
> completeness:
>
> 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.  You might be able to get
> a better sense of what happened with GIT_TRACE=1 or strace.

I think it would be a bug in python not wait(2)ing for the subprocess during the implicit close when exiting.

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Previous: Jonathan Nieder
Message 17 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.