Re: [PATCH 3/3] add-interactive: add new "context" subcommand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/05/2025 17:37, Junio C Hamano wrote:

An alternative that may work better is to allow subcommand specific
parameters in the answer to the "What now>" prompt, e.g.

	What now> r -U7

to choose an equivalent to "git revert -p -U7".

I think the best solution would be to allow users to re-display the current hunk with more context inside "add -p" rather than changing "add -i". That way a user who needs more context to make a decision on the current hunk can get it without restarting the whole process of selecting hunks [1]. If the user knows up front that they want a certain amount of context they can use "git add -p -U <context>" or "git add -i -U <context>" which was added in the preceding patch.

Best Wishes

Phillip

[1] With "git add -p" they can quit and carry on from where they left off but "git stash -p" doesn't let you amend an existing stash and git refuses to pop a stash if the working tree is dirty. This means if a stash is split in two because the user exited to change the context they cannot pop both stashes on top of each other.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux