From: Junio C Hamano <junkio@cox.net>
To: "Jon Smirl" <jonsmirl@gmail.com>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org, junkio@cox.net
Subject: Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/
Date: Wed, 26 Jul 2006 11:23:59 -0700 [thread overview]
Message-ID: <7virlkrzr4.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <9e4733910607261050k5f8d8d5dke5ded3a806b46f21@mail.gmail.com> (Jon Smirl's message of "Wed, 26 Jul 2006 13:50:54 -0400")
"Jon Smirl" <jonsmirl@gmail.com> writes:
> An exact test case:
>
> git clone git foo
> git clone git foo1
> cd foo
> mkdir zzz
> git mv gitweb zzz
> cg diff >patch
> cd ../foo1
> cg patch <../foo/patch
>
> This patch won't apply because zzz does not exist in foo1
A short and sweet reproduction recipe is essential for a problem
report like this, and I appreciate it very much. "git mv" in
"master" should do the right thing and I see Johannes fixing (or
fixed) the problem of "git mv" failing in his version.
We should correctly handle cases that fit your general
description (the test t/t4112-apply-renames.sh has a file in
"klibc/arch/x86_64" which is renamed and copied to two different
locations under "include/arch"). The above does not reproduce
for me if I used "git diff HEAD >patch" in place of "cg diff" (I
cannot make cg behave on my machine).
$ mkdir zzz
$ ~/git-master/bin/git-mv gitweb zzz/
$ LANG=C LC_ALL=C find gitweb zzz -type f -print
find: gitweb: No such file or directory
zzz/gitweb/README
zzz/gitweb/gitweb.cgi
zzz/gitweb/gitweb.css
zzz/gitweb/test/M??rchen
zzz/gitweb/test/file with spaces
zzz/gitweb/test/file+plus+sign
$ git diff HEAD >patch
$ git checkout -f HEAD
$ LANG=C LC_ALL=C find gitweb zzz -type f -print
gitweb/README
gitweb/gitweb.cgi
gitweb/gitweb.css
gitweb/test/M??rchen
gitweb/test/file with spaces
gitweb/test/file+plus+sign
find: zzz: No such file or directory
$ git apply --index <patch
$ LANG=C LC_ALL=C find gitweb zzz -type f -print
zzz/gitweb/README
zzz/gitweb/gitweb.cgi
zzz/gitweb/gitweb.css
zzz/gitweb/test/M??rchen
zzz/gitweb/test/file with spaces
zzz/gitweb/test/file+plus+sign
A couple of weeks ago test t/t4114-apply-typechange.sh was added
by Eric Wong, and it caught cases where git-apply was assuming
that leading directories of a new file already exists or was
complaining when you create file "foo" and remove a file
"foo/bar" (that is, you used to have directory at "foo"). The
problems that test found were all fixed as far as I recall.
next prev parent reply other threads:[~2006-07-26 18:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-26 17:41 [PATCH 1/2] t7001: add test for git-mv dir1 dir2/ Johannes Schindelin
2006-07-26 17:50 ` Jon Smirl
2006-07-26 18:23 ` Junio C Hamano [this message]
2006-07-26 18:31 ` Jon Smirl
2006-07-26 18:58 ` Junio C Hamano
2006-07-26 19:31 ` Junio C Hamano
2006-07-26 20:33 ` Jon Smirl
2006-07-26 18:47 ` Johannes Schindelin
2006-07-26 18:39 ` Josef Weidendorfer
2006-07-26 19:05 ` Junio C Hamano
2006-07-28 1:30 ` Petr Baudis
2006-07-28 2:41 ` Junio C Hamano
2006-07-28 2:56 ` Petr Baudis
2006-07-28 4:48 ` Junio C Hamano
2006-07-28 15:47 ` Petr Baudis
2006-07-28 10:14 ` [PATCH] Teach git-apply about '-R' Johannes Schindelin
2006-07-28 15:14 ` Linus Torvalds
2006-07-28 15:46 ` [PATCH v2] " Johannes Schindelin
2006-07-28 15:36 ` [PATCH] " Junio C Hamano
2006-07-28 15:50 ` Johannes Schindelin
2006-07-28 19:20 ` Junio C Hamano
2006-07-28 19:36 ` Johannes Schindelin
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7virlkrzr4.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jonsmirl@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).