Re: [PATCH v2 2/2] merge-base: --reflog mode finds fork point from reflog entries

2013-10-25 Thread Johannes Sixt
Am 10/25/2013 0:21, schrieb Junio C Hamano: +test_expect_success 'using reflog to find the fork point' ' + git reset --hard + git checkout -b base $E + + for count in 1 2 3 4 5 + do + git commit --allow-empty -m Base commit #$count + git rev-parse

Re: [PATCH v2 2/2] merge-base: --reflog mode finds fork point from reflog entries

2013-10-25 Thread John Keeping
On Fri, Oct 25, 2013 at 09:12:10AM +0200, Johannes Sixt wrote: Am 10/25/2013 0:21, schrieb Junio C Hamano: +test_expect_success 'using reflog to find the fork point' ' + git reset --hard + git checkout -b base $E + + for count in 1 2 3 4 5 + do + git commit

Re: [PATCH v2 2/2] merge-base: --reflog mode finds fork point from reflog entries

2013-10-25 Thread Johannes Sixt
Am 10/25/2013 10:09, schrieb John Keeping: On Fri, Oct 25, 2013 at 09:12:10AM +0200, Johannes Sixt wrote: You could put the loops into a function from which you 'return', but that is obscure in this case. The first iteration was better, IMO. Wouldn't it be simpler to just return from the

Re: [PATCH v2 2/2] merge-base: --reflog mode finds fork point from reflog entries

2013-10-25 Thread Junio C Hamano
Johannes Sixt j.s...@viscovery.net writes: +for count in 1 2 3 4 5 +do +git merge-base --reflog base $(cat derived$count) actual +test_cmp expect$count actual || break +done This does not work as intended because the exit code of 'break' is always

[PATCH v2 2/2] merge-base: --reflog mode finds fork point from reflog entries

2013-10-24 Thread Junio C Hamano
The git pull --rebase command computes the fork point of the branch being rebased using the reflog entries of the base branch (typically a remote-tracking branch) the branch's work was based on, in order to cope with the case in which the base branch has been rewound and rebuilt. For example, if