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

Re: git add -i doesn't update permissions

From
Jeff King <peff@peff.net>
Date
Mar 27, 2008, 06:29 UTC
Message-ID
<20080327062932.GA11697@coredump.intra.peff.net>
In-Reply-To
<20080327055746.GA8469@coredump.intra.peff.net>
On Thu, Mar 27, 2008 at 01:57:46AM -0400, Jeff King wrote:
Show 5 quoted lines
>   2. 'p' will show you each patch hunk from the file, which can then
>      either be added or not.
> 
> You are using 'p' and expecting it to work with the file mode, when it
> is purely about picking content hunks.

Actually, it is a little more complex than that. "git add -p" will reuse the header from "git diff", so it will not apply a mode change _unless_ any hunk is selected.

So probably the right behavior is to split the header into "boilerplate" and "mode change", and then ask whether the mode change should be included.

-Peff
Previous: Jeff KingNext: Wincent Colaiuta
Message 3 of 5 in “git add -i doesn't update permissions”
  1. Jörg SommerMar 26, 2008
  2. Jeff KingMar 27, 2008
  3. Jeff KingMar 27, 2008
  4. Wincent ColaiutaMar 27, 2008
  5. Junio C HamanoMar 27, 2008

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.