From: Junio C Hamano <junkio@cox.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] diff-format.txt: Combined diff format documentation supplement
Date: Thu, 26 Oct 2006 00:10:06 -0700 [thread overview]
Message-ID: <7vvem7r1rl.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7v1wovsgkf.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Thu, 26 Oct 2006 00:05:04 -0700")
This script minimally demonstrates a few interesting things an
evil merge can do. Run it in a throw-away directory and view
the resulting merge with "git-show" with or without the patch I
sent out earlier.
One thing that you would notice is that the combined-diff code
chooses not to show the original contents of a deleted
file. while showing the whole result of a new file. Strictly
speaking, this is inconsistent, but an evil merge is rare and
what ended up getting removed is not as interesting as what
remains as the result.
-- >8 --
#!/bin/sh
test -d .git && {
echo Run me in an empty directory please
exit 1
}
git init-db
echo one >file1.txt
git add file1.txt
git commit -m initial
git branch side
echo two >file2.txt
git add file2.txt
git commit -m second
git checkout side
echo uno >file1.txt
git commit -a -m side
git merge "Evil merge" HEAD master
rm -f file1.txt
echo added by the evil merge >file3.txt
echo modified by the evil merge >file2.txt
git update-index --add --remove file1.txt file2.txt file3.txt
EDITOR=: VISUAL=: git commit --amend
prev parent reply other threads:[~2006-10-26 7:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-25 22:22 Combined diff format documentation Jakub Narebski
2006-10-25 22:40 ` Junio C Hamano
2006-10-25 22:58 ` Jakub Narebski
2006-10-25 23:14 ` Junio C Hamano
2006-10-25 23:24 ` Junio C Hamano
2006-10-25 23:45 ` Jakub Narebski
2006-10-26 1:48 ` Horst H. von Brand
2006-10-26 3:04 ` Junio C Hamano
2006-10-26 3:44 ` [PATCH] diff-format.txt: Combined diff format documentation supplement Jakub Narebski
2006-10-26 6:15 ` Junio C Hamano
2006-10-26 7:05 ` Junio C Hamano
2006-10-26 7:10 ` Junio C Hamano [this message]
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=7vvem7r1rl.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=jnareb@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