Thread (2 messages) 2 messages, 2 authors, 2016-06-15

Re: [PATCH] interpret_nth_last_branch(): avoid traversing the reflogs twice

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:58

Hi,

On Sat, 17 Jan 2009, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
Instead of traversing them twice, we just build a list of branch switches,
pick the one we're interested in, and free the list again.
Isn't the code keeping them all in core, or am I reading the patch wrong?

If you know that you are interested in the nth-from-the-last switch, and
if you are reading from the beginning, you would need to keep at most n 
last switches you have seen in core, wouldn't you?  
That is correct.  But this is such a highly uncritical code path that I'd 
like to keep this simple rather than fast.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help