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

3 messages from 2023-08-13 to 2023-08-13. Participants: Alejandro Colomar, Junio C Hamano.
Thread: https://gitlist.dev/t/60110

## Alejandro Colomar, 2023-08-13 19:21

Subject: [wishlist] git-add(1), git-restore(1): -U for more context (with -p)
Message-ID: <8bbfa6fe-fdaa-aeaf-51bc-16b3d3f7afaa@kernel.org>
URL: https://gitlist.dev/e/8bbfa6fe-fdaa-aeaf-51bc-16b3d3f7afaa%40kernel.org

```
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, 2023-08-13 19:44

Subject: Re: [wishlist] git-add(1), git-restore(1): -U for more context (with -p)
Message-ID: <xmqq350mohgu.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq350mohgu.fsf%40gitster.g
In-Reply-To: <8bbfa6fe-fdaa-aeaf-51bc-16b3d3f7afaa@kernel.org>

```
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, 2023-08-13 19:45

Subject: Re: [wishlist] git-add(1), git-restore(1): -U for more context (with -p)
Message-ID: <6b191540-c2b2-435e-667b-43c251b829fe@kernel.org>
URL: https://gitlist.dev/e/6b191540-c2b2-435e-667b-43c251b829fe%40kernel.org
In-Reply-To: <xmqq350mohgu.fsf@gitster.g>

```
On 2023-08-13 21:44, Junio C Hamano wrote:
> 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


```
