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

Re: [PATCH] unpack-trees: do not abort when overwriting an existing file with the same content

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 21, 2013, 01:35 UTC
Message-ID
<CACsJy8C-vRVsC5uj8xqucwMBZ2TEtwSF-58xM2oTSp6RtNAWMg@mail.gmail.com>
In-Reply-To
<7va9s3n1my.fsf@alter.siamese.dyndns.org>
On Mon, Jan 21, 2013 at 1:35 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>> +     /*
>> +      * If it has the same content that we are going to write down,
>
> write down???
hmm.. "overwrite" then.
Show 6 quoted lines
>> +      * there's no point in complaining. We still overwrite it in the
>> +      * end though. Permission is not checked so it may be lost.
>> +      */
>
> That is a regression, isn't it?  Is it too cumbersome to avoid
> losing the permission bits by stopping in that case?

I'm not sure how to deal with this case. (Lack of) Executable bit can be easily restored (unlike file content) if we give the user the list of changed files. On the other hand, not everybody runs git with a huge scrollback buffer and warnings can be lost. I guess abort is a safe choice.

-- 
Duy
Previous: Junio C HamanoNext: Nguyễn Thái Ngọc Duy
Message 3 of 9 in “unpack-trees: do not abort when overwriting an existing file with the same content”
  1. unpack-trees: do not abort when overwriting an existing file with the same contentNguyễn Thái Ngọc Duy, Jan 19, 2013
  2. Junio C HamanoJan 20, 2013
  3. Duy NguyenJan 21, 2013
  4. unpack-trees: do not abort when overwriting an existing file with the same contentNguyễn Thái Ngọc Duy, Jan 21, 2013
  5. Jeff KingJan 21, 2013
  6. Duy NguyenJan 22, 2013
  7. Junio C HamanoJan 22, 2013
  8. Duy NguyenJan 22, 2013
  9. Jeff KingJan 22, 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.