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

Re: [PATCH 0/3] Fixing volatile HEAD in push.default = current

From
Junio C Hamano <gitster@pobox.com>
Date
May 23, 2013, 14:45 UTC
Message-ID
<7vmwrlhi0h.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130523085359.GA23933@inner.h.apk.li>
Andreas Krey <a.krey@gmx.de> writes:
Show 10 quoted lines
> On Thu, 23 May 2013 13:25:55 +0000, Ramkumar Ramachandra wrote:
>> Junio C Hamano wrote:
>> >     I have "largedir" I want to get rid of, but there is a directory
>> >     I want to save, "largedir/precious", in it, so I do
>> >
>> >         cp -R largedir/precious precious
>> >
>> >     and then run 'rm -rf largedir' in another terminal in parallel.
>
> 'mv largedir/precious precious; rm -rf largedir'? No race here.

Yeah, but 'cp -R largedir/precious precious; rm -fr largedir' is the same thing. Ram's original issue was "I do something else in another terminal without waiting for the first command to finish".

Even with 'mv', between the time the main in mv starts and the process finally issues rename(2) on the directory, you can start running what competes and interferes with it in another terminal, so it does not fundamentally change anything, I would have to say.

Previous: Andreas KreyNext: Andreas Krey
Message 15 of 17 in “Fixing volatile HEAD in push.default = current”
  1. 0/3 Fixing volatile HEAD in push.default = currentRamkumar Ramachandra, May 21, 2013
  2. 1/3 push: factor out the detached HEAD error messageRamkumar Ramachandra, May 21, 2013
  3. 2/3 push: fail early with detached HEAD and currentRamkumar Ramachandra, May 21, 2013
  4. 3/3 push: don't push the volatile HEAD with currentRamkumar Ramachandra, May 21, 2013
  5. Junio C HamanoMay 21, 2013
  6. Ramkumar RamachandraMay 21, 2013
  7. Junio C HamanoMay 21, 2013
  8. Junio C HamanoMay 21, 2013
  9. Ramkumar RamachandraMay 21, 2013
  10. Junio C HamanoMay 22, 2013
  11. Ramkumar RamachandraMay 22, 2013
  12. Junio C HamanoMay 22, 2013
  13. Ramkumar RamachandraMay 23, 2013
  14. Andreas KreyMay 23, 2013
  15. Junio C HamanoMay 23, 2013
  16. Andreas KreyMay 23, 2013
  17. Junio C HamanoMay 23, 2013

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.