Re: [PATCH] interpret_nth_last_branch(): avoid traversing the reflogs twice
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 20, 2009, 00:23 UTC
- Message-ID
- <alpine.DEB.1.00.0901200121190.3586@pacific.mpi-cbg.de>
- In-Reply-To
- <200901200111.38917.trast@student.ethz.ch>
Hi,
On Tue, 20 Jan 2009, Thomas Rast wrote:
Show 13 quoted lines
> Johannes Schindelin wrote: > > > Junio C Hamano <gitster@pobox.com> writes: > > > > You can have quite a many reflog entries, but you typically won't recall > > > > which branch you were on after switching branches for more than several > > > > times. > > > > This, together with a removal of the hard-coded limit of 16 could be > > squashed with this patch: > > You know, I'm quite puzzled as to why we had working code that could > read the reflog backwards earlier in this thread, but it got shot down > solely based on impact and line counts, and you now have to jump > through hoops to work around the lack of this exact functionality.
Okay, I should have told you what my two main concerns with the patch were.
1) it introduces a lot of code, with a lot of possibility for bugs to hide (and I found it not simple enough to slap my head and say "of course, this is obvious" as I did with Junio's code (except the modulo thing which I had to thing about for half a minute)).
2) on Windows, mmap() is really implemented as xmalloc() && fread(). So all the shortcomings of what Junio said about my array approach would hold true for your approach, too.
Ciao, Dscho