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
Andreas Krey <a.krey@gmx.de>
Date
May 23, 2013, 08:53 UTC
Message-ID
<20130523085359.GA23933@inner.h.apk.li>
In-Reply-To
<CALkWK0mfGWA3aBntQQU5fkCJDPx+MUOScvMRJjS+JzjNucFzPw@mail.gmail.com>
On Thu, 23 May 2013 13:25:55 +0000, Ramkumar Ramachandra wrote:
Show 7 quoted lines
> 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.
...
Show 8 quoted lines
> Consider a slightly different example: I rename a file while having an
> active file handle open in a process that's reading the file.  Will
> the rename fail or will the fread() in the process fail?  Nope, both
> work fine.  Replace "rename" with "remove", and we still have the same
> answer.  Ofcourse there are no guarantees: I can start up another
> process to overwrite the sectors corresponding to that file's data
> with zeros; unless the complete file is there in the kernel buffer, a
> read() will eventually end up slurping in the zeros (or fail?), right?

Oh, there are guarantees, they just don't include the case where you take a shotgun to the disk. (Or do it on an nfs mount and delete the file from another machine.)

...
Andreas
-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 14 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.