Re: [PATCH 2/2] built-in rebase: reinstate `checkout -q` behavior where appropriate

2018-11-12 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >>> On the other hand, for a file-scope static that is likely to stay as a >>> non-API function but a local helper, it may not be worth it. >> >> Oh, do you think that `reset_head()` is likely to stay as non-API >> function? I found myself

Re: [PATCH 2/2] built-in rebase: reinstate `checkout -q` behavior where appropriate

2018-11-12 Thread Junio C Hamano
Johannes Schindelin writes: >> On the other hand, for a file-scope static that is likely to stay as a >> non-API function but a local helper, it may not be worth it. > > Oh, do you think that `reset_head()` is likely to stay as non-API > function? I found myself in the need of repeating this

Re: [PATCH 2/2] built-in rebase: reinstate `checkout -q` behavior where appropriate

2018-11-12 Thread Johannes Schindelin
Hi Junio, On Mon, 12 Nov 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> > static int reset_head(struct object_id *oid, const char *action, > >> > - const char *switch_to_branch, int detach_head, > >> > + const char *switch_to_branch,

Re: [PATCH 2/2] built-in rebase: reinstate `checkout -q` behavior where appropriate

2018-11-12 Thread Johannes Schindelin
Hi Peff, On Fri, 9 Nov 2018, Jeff King wrote: > On Fri, Nov 09, 2018 at 06:21:41PM +0100, Johannes Schindelin wrote: > > > Actually, you got me thinking about the desc.buffer. And I think there is > > one corner case where it could cause a problem: `struct tree_desc desc[2]` > > does not

Re: [PATCH 2/2] built-in rebase: reinstate `checkout -q` behavior where appropriate

2018-11-11 Thread Junio C Hamano
Johannes Schindelin writes: >> > static int reset_head(struct object_id *oid, const char *action, >> > -const char *switch_to_branch, int detach_head, >> > +const char *switch_to_branch, >> > +int detach_head, int reset_hard, >> >> It might be

Re: [PATCH 2/2] built-in rebase: reinstate `checkout -q` behavior where appropriate

2018-11-09 Thread Jeff King
On Fri, Nov 09, 2018 at 06:21:41PM +0100, Johannes Schindelin wrote: > Actually, you got me thinking about the desc.buffer. And I think there is > one corner case where it could cause a problem: `struct tree_desc desc[2]` > does not initialize the buffers to NULL. And what if >

Re: [PATCH 2/2] built-in rebase: reinstate `checkout -q` behavior where appropriate

2018-11-09 Thread Johannes Schindelin
Hi Peff, On Fri, 9 Nov 2018, Jeff King wrote: > On Fri, Nov 09, 2018 at 01:34:19AM -0800, Johannes Schindelin via > GitGitGadget wrote: > > > From: Johannes Schindelin > > > > When we converted a `git checkout -q $onto^0` call to use > > `reset_head()`, we inadvertently incurred a change

Re: [PATCH 2/2] built-in rebase: reinstate `checkout -q` behavior where appropriate

2018-11-09 Thread Jeff King
On Fri, Nov 09, 2018 at 01:34:19AM -0800, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > When we converted a `git checkout -q $onto^0` call to use > `reset_head()`, we inadvertently incurred a change from a twoway_merge > to a oneway_merge, as if we wanted a `git