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