threads / discuss / 60110

[wishlist] git-add(1), git-restore(1): -U for more context (with -p)

Subject: [wishlist] git-add(1), git-restore(1): -U for more context (with -p)

## tl;dr

3 messages between Aug 13, 2023 and Aug 13, 2023.

replies: 2people: 2as markdown or json

Alejandro Colomar· Aug 13, 2023, 19:21 UTC · lore
Hi!

It would be useful to have -U in git-add(1) and git-restore(1) to be able to see more context in combination with -p.

Cheers, Alex

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Junio C Hamano· Aug 13, 2023, 19:44 UTC · re: Alejandro Colomar · lore

Re: [wishlist] git-add(1), git-restore(1): -U for more context (with -p)

Alejandro Colomar <alx@kernel.org> writes:
> It would be useful to have -U in git-add(1) and git-restore(1)
> to be able to see more context in combination with -p.

Even more useful would be to add commands to enlarge/shrink the context to the interactive prompt, wouldn't it? Not all hunks need unformly large context and having to decide how many lines of context to ask upfront and having to stick to the choice during the whole interactive session would be a bad interactive experience.

Alejandro Colomar· Aug 13, 2023, 19:45 UTC · re: Junio C Hamano · lore

Re: [wishlist] git-add(1), git-restore(1): -U for more context (with -p)

On 2023-08-13 21:44, Junio C Hamano wrote:
Show 10 quoted lines
> Alejandro Colomar <alx@kernel.org> writes:
> 
>> It would be useful to have -U in git-add(1) and git-restore(1)
>> to be able to see more context in combination with -p.
> 
> Even more useful would be to add commands to enlarge/shrink the
> context to the interactive prompt, wouldn't it?  Not all hunks need
> unformly large context and having to decide how many lines of
> context to ask upfront and having to stick to the choice during the
> whole interactive session would be a bad interactive experience.
Yep, that would be even more useful!  :)
-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

← back to recent threads