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

Re: [PATCH] check_and_freshen_file: fix reversed success-check

From
XHX H <music_is_live_lg@hotmail.com>
Date
Jul 13, 2015, 19:58 UTC
Message-ID
<BLU437-SMTP9300461B7BF5F0DBDBE51BF69C0@phx.gbl>
In-Reply-To
<20150713035224.GA3315@peff.net>
Le 13/07/2015 5:52, Jeff King a écrit :
Show 16 quoted lines
> On Sun, Jul 12, 2015 at 12:21:33AM +0200, X H wrote:
>
>> How are the permission handled, is it git that is asking to create a file
>> read only or rw on the remote or is it the environment with umask ans so on
>> that decides it, or Windows when the drive is mounted with noacl?
>
> Generally, git follows the umask when creating most files. However, for
> the object files in the object database, it does drop the "w" bit, as
> once written, they should never be changed (after all, the filename is a
> hash of the contents). We don't ever open those files for writing, but
> we may try to rename another file over them; that might behave
> differently on Unix versus Windows (or even differently on Windows
> between local and remote-mounted filesystems).
>
> -Peff
>
Hi,

When mounted on Linux the object files were created rw on the share, but when mounted on Windows the temporary files are created with read-only attributes.

Thank you for your patch, forced push are now working from git-on-windows to smb folders shared from another Windows machine. I've not yet tested to push to the share with another user, but I think it should makes no diff.

Previous: Jeff KingNext: X H
Message 15 of 17 in “Git force push fails after a rejected push (unpack failed)?”
  1. X HJul 7, 2015
  2. Jeff KingJul 7, 2015
  3. Jeff KingJul 7, 2015
  4. Eric SunshineJul 7, 2015
  5. Johannes SixtJul 8, 2015
  6. Jeff KingJul 8, 2015
  7. check_and_freshen_file: fix reversed success-checkJeff King, Jul 8, 2015
  8. Junio C HamanoJul 8, 2015
  9. check_and_freshen_file: fix reversed success-checkJeff King, Jul 8, 2015
  10. Johannes SixtJul 8, 2015
  11. Johannes SixtJul 9, 2015
  12. Jeff KingJul 9, 2015
  13. X HJul 11, 2015
  14. Jeff KingJul 13, 2015
  15. X HJul 13, 2015
  16. X HJul 8, 2015
  17. Johannes SixtJul 8, 2015

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.