Re: Possible merge bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

Le 2021-11-11 à 06:20, Saksham Mittal a écrit :
Hello there,

I wrote a small script as well that automates testing this use case as well, but I don't really know what the policy is on attachments in git, seeing as how it's my first time contributing to git.

I used the script from Saksham (slightly modified to not depend on any Git configuration)
and could not reproduce either with Git built from the same commit as you.
Maybe some setting in your ~/.gitconfig is at play ?

For the record, my edited version of the reproducer:

--- 8< ---
#!/bin/sh

export PATH="/path/to/built/git/bin-wrappers:$PATH"
export GIT_AUTHOR_NAME=J
export GIT_AUTHOR_EMAIL=j@xxxxx
export GIT_COMMITTER_NAME=J
export GIT_COMMITTER_EMAIL=j@xxxxx
export HOME=

git --version --build-options

rm -rf sample
mkdir sample
cd sample
git init
echo -e "a\nb\nc\n" > test
git add .
git commit -m "abc"

git branch b1
git switch b1

echo -e "b\na\nc" > test
git add .
git commit -m "bac"

git switch master
git branch b2
git switch b2

echo -e "b\nc\na" > test
git add .
git commit -m "bca"

git switch master
echo "----- Merging b1 -----"
git merge b1
cat test
echo "----- Merging b2 -----"
git merge b2
echo "----- Content of test -----"
cat test
--- 8< ---


Running it ends with this output:


----- Merging b1 -----
Updating 5e00de3..02910cf
Fast-forward
 test | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
b
a
c
----- Merging b2 -----
Auto-merging test
CONFLICT (content): Merge conflict in test
Automatic merge failed; fix conflicts and then commit the result.
----- Content of test -----
b
a
c
<<<<<<< HEAD
=======
a
b2


Cheers,
Philippe.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux