Re: bug with git merge-base

2018-09-20 Thread Junio C Hamano
Junio C Hamano writes: > Well, reading builtin/merge-base.c::handle_fork_point(), I think the > intended behaviour is: > > - die() when input is not well formed (e.g. bad commit object, >ambigous ref name, etc.); there is an error worth reporting in >this case. > > - show one that used

Re: bug with git merge-base

2018-09-20 Thread Junio C Hamano
Eric Sunshine writes: > On Wed, Sep 19, 2018 at 6:25 PM Alexander Mills > wrote: >> The following command sequence exits with 1, and no stderr >> >> base='remotes/origin/dev'; >> fork_point="$(git merge-base --fork-point "$base")"; >> >> I cannot figure out why it's exiting with 1, but there is

Re: bug with git merge-base

2018-09-20 Thread Eric Sunshine
On Wed, Sep 19, 2018 at 6:25 PM Alexander Mills wrote: > The following command sequence exits with 1, and no stderr > > base='remotes/origin/dev'; > fork_point="$(git merge-base --fork-point "$base")"; > > I cannot figure out why it's exiting with 1, but there is no stdout/stderr Unable to

Re: A bug in git merge

2018-03-27 Thread Jeff King
On Tue, Mar 27, 2018 at 12:53:52PM +0300, Orgad Shaneh wrote: > If I cherry-pick a commit that added a line, then merge another commit > which removes this line, the line remains in the file instead of being > removed. > > The following script demonstrates the bug. > > file should be equivalent

A bug in git merge

2018-03-27 Thread Orgad Shaneh
Hi, If I cherry-pick a commit that added a line, then merge another commit which removes this line, the line remains in the file instead of being removed. The following script demonstrates the bug. file should be equivalent on both branches git init seq 1 20 > file git add file git commit -m

Re: Bug with git merge-base and a packed ref

2016-10-12 Thread Stepan Kasal
Hello, On Wed, Oct 12, 2016 at 12:32:09PM -0400, Jeff King wrote: > The --fork-point option looks in the reflog [...] > On Wed, Oct 12, 2016 at 12:37:16PM +0200, Stepan Kasal wrote: > > Could you please fix merge-base so that it understands packed refs? I bet you nailed it; nothing with packed

Re: Bug with git merge-base and a packed ref

2016-10-12 Thread Jeff King
On Wed, Oct 12, 2016 at 12:37:16PM +0200, Stepan Kasal wrote: > A reproducer would look like that > > # in repo1: > git checkout tmp > cd .. > git clone repo1 repo2 > cd repo1 > git rebase elsewhere tmp > cd ../repo2 > # edit > git commit -a -m 'Another commit' > git pull -r > > The last