From: Philippe Blain <levraiphilippeblain@gmail.com>
To: Saksham Mittal <saksham.mittal000@gmail.com>, schiff.michael@gmail.com
Cc: git@vger.kernel.org
Subject: Re: Possible merge bug
Date: Thu, 11 Nov 2021 09:28:42 -0500 [thread overview]
Message-ID: <da873a08-c73a-cc30-6b7d-dd5cd3bacb22@gmail.com> (raw)
In-Reply-To: <5aa1fb67-6bd8-6de3-8271-369722b6ebef@gmail.com>
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@l.com
export GIT_COMMITTER_NAME=J
export GIT_COMMITTER_EMAIL=j@l.com
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.
next prev parent reply other threads:[~2021-11-11 14:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 6:26 Possible merge bug Michael Schiff
2021-11-11 11:20 ` Saksham Mittal
2021-11-11 14:28 ` Philippe Blain [this message]
2021-11-13 3:49 ` Michael Schiff
2021-11-13 7:11 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da873a08-c73a-cc30-6b7d-dd5cd3bacb22@gmail.com \
--to=levraiphilippeblain@gmail.com \
--cc=git@vger.kernel.org \
--cc=saksham.mittal000@gmail.com \
--cc=schiff.michael@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).