Thread (1 message) 1 message, 1 author, 2018-11-13

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

From: Junio C Hamano <hidden>
Date: 2018-11-13 01:49:27

Johannes Schindelin [off-list ref] writes:
quoted
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 tedious
unpack_trees() dance quite a few times over the past two years, and it is
*always* daunting because the API is *that* unintuitive.

So I *do* hope that `reset_head()` will actually be moved to reset.[ch]
eventually, and callsites e.g. in `sequencer.c` will be converted from
calling `unpack_trees()` to calling `reset_head()` instead.
As long as the public API function is well thought out, of course it
is OK.  Ideally, builtin/reset.c can detect when it is making a hard
reset to HEAD and call that same function.  Which may or may not
mean you would also want to tell it to record ORIG_HEAD and remove
MERGE_HEAD and others), perhaps with another bit in that flag word.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help