Re: [VALGRIND PATCH for nth_last patch series] Fix invalid memory access
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Jan 21, 2009, 09:18 UTC
- Message-ID
- <200901211019.01493.trast@student.ethz.ch>
- In-Reply-To
- <7vwscpgi7t.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
> We only accept "checkout: moving from A to B" newer style reflog entries, > in order to pick up A. There is no point computing where B begins at > after running strstr to locate " to ", nor adding 4 and then subtracting 4 > from the same pointer.
[...]
Show 5 quoted lines
> - len = target - match - 4; > - if (target[len] == '\n' && !strncmp(match, target, len)) > - return 0; > - > + len = target - match;
Actually the point of that exercise was to ignore branch (non)switches of the form
checkout: moving from A to A
I originally thought that this would be desirable behaviour, but now that it causes so much trouble, I'm not that sure any more. I still think it would be more intuitive to not count them as switches (after all git-checkout says 'Already on "$branch"'), but OTOH 'cd .; cd -' also stays in the same directory.
Thanks for all the work you (both) are doing on this. I hope to find the time to read the current state of the series tonight.
--
Thomas Rast
trast@{inf,student}.ethz.ch