diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-19 00:04:25 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-19 15:35:21 -0800 |
commit | c2883e62f5b9980e5402431f2261c961354d0f15 (patch) | |
tree | be6de693adb7e9b21e95e9409dc06a7d341d9133 /decorate.h | |
parent | checkout: implement "-" abbreviation, add docs and tests (diff) | |
download | tgif-c2883e62f5b9980e5402431f2261c961354d0f15.tar.xz |
interpret_nth_last_branch(): avoid traversing the reflog twice
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.
Instead of reading the reflog twice, this reads the branch switching event
and keeps as many entries as the user asked from the latest such entries,
which is the minimum required to be able to switch back to the branch we
were recently on.
[jc: improvements from Dscho squashed in]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'decorate.h')
0 files changed, 0 insertions, 0 deletions