threads / discuss / 45329

git commit --interactive patch-mode no longer allows selecting files

Subject: git commit --interactive patch-mode no longer allows selecting files

## tl;dr

4 messages between Mar 9, 2017 and Mar 10, 2017.

replies: 3people: 3as markdown or json

Jörn Hees· Mar 9, 2017, 17:48 UTC · lore
Hi,
i'm not entirely sure if this is a bug or intended (couldn't find it in the changelogs though)...
Before 2.12.0 a `git commit --int` / `git add --int` followed by [p] for patch-mode, would allow a numeric selection of the files to patch hunks for (this behavior is well documented all over the internet).
Since 2.12.0 the numeric selection is skipped and automatically drops me directly into hunk mode (Mac OS X homebrew).
I would see this as a feature if only one file is changed. As soon as multiple files are changed, i often have the use-case that i'm in some bigger change, but want to quickly fix something in other files. In those cases, the new behavior forces me to `d` out of potentially many files, just to quickly commit some small change :-/

I already tried in several repos and without ~/.gitconfig . Are there any config options i'm missing?

Best, Jörn

Jeff King· Mar 9, 2017, 18:23 UTC · re: Jörn Hees · lore

Re: git commit --interactive patch-mode no longer allows selecting files

On Thu, Mar 09, 2017 at 06:48:58PM +0100, Jörn Hees wrote:
Show 8 quoted lines
> i'm not entirely sure if this is a bug or intended (couldn't find it in the changelogs though)...
> 
> Before 2.12.0 a `git commit --int` / `git add --int` followed by [p]
> for patch-mode, would allow a numeric selection of the files to patch
> hunks for (this behavior is well documented all over the internet).
> 
> Since 2.12.0 the numeric selection is skipped and automatically drops
> me directly into hunk mode (Mac OS X homebrew).

It's a bug. The fix is in c852bd54bd87fdcdc825f5d45c26aa745be13ba6, but has not yet been merged to any integration branches. I hope it will make it into v2.12.1.

-Peff
Junio C Hamano· Mar 10, 2017, 19:57 UTC · re: Jeff King · lore

Re: git commit --interactive patch-mode no longer allows selecting files

Jeff King <peff@peff.net> writes:
> It's a bug. The fix is in c852bd54bd87fdcdc825f5d45c26aa745be13ba6, but
> has not yet been merged to any integration branches. I hope it will make
> it into v2.12.1.
Wow, you got me worried.  

It has been in 'pu' (and my private edition 'jch', which is somewhere between 'next' and 'pu') and marked as "Will merge to 'next'".

Jeff King· Mar 10, 2017, 19:58 UTC · re: Junio C Hamano · lore

Re: git commit --interactive patch-mode no longer allows selecting files

On Fri, Mar 10, 2017 at 11:57:04AM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > It's a bug. The fix is in c852bd54bd87fdcdc825f5d45c26aa745be13ba6, but
> > has not yet been merged to any integration branches. I hope it will make
> > it into v2.12.1.
> 
> Wow, you got me worried.  
> 
> It has been in 'pu' (and my private edition 'jch', which is
> somewhere between 'next' and 'pu') and marked as "Will merge to
> 'next'".

Yeah, sorry, I just meant "not in master or next". I did check that you had picked it up.

-Peff

← back to recent threads