From: Steven Grimm <koreth@midwinter.com>
To: Junio C Hamano <junkio@cox.net>
Cc: Matthias Lederhofer <matled@gmx.net>, git@vger.kernel.org
Subject: Re: [RFH] straightening out "read-tree -m"
Date: Sun, 18 Mar 2007 16:20:59 -0700 [thread overview]
Message-ID: <45FDC95B.5020106@midwinter.com> (raw)
In-Reply-To: <7v8xdul2rt.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> In any case, the reason why for full two years this switching
> between branches that have "foo/" and "foo" never surfaced as an
> issue is that people are saner than doing that in practice (and
> I think people coming from CVS couldn't do that before so they
> may not even think about doing so).
>
I can at least give you some insight into the real-world scenario that
led to the current discussion. It's only slightly insane. :) We had a
shell script called "foo" in our source directory. It had to turn into a
multi-source-file app for various reasons. So the standalone script got
replaced with a directory "foo" containing the source files.
I suppose one could argue that we should have called the original
"foo.sh" or something and renamed it to "foo" at build/deploy time, but
given that extensions aren't required on shell scripts (and that we have
zillions of other scripts happily living without extensions) I suppose
that just felt unnecessary.
By the way, Subversion required that we do this in two separate commits,
the first to delete the shell script and the second to make the
directory with the files in it. We originally tried to do both in one
commit and it got confused. Then, some time after we'd done the separate
commits in svn, we updated our git-svn repositories and ran into the
problem.
In fact, when we tried to merge in the batch of changes from the git-svn
tracking branch, we also ran into merge problems. Git got rather
confused and the merge started complaining about files being untracked
when in fact they were tracked in both branches! It looked like the
index and/or working copy were left in an inconsistent state when the
merge engine bailed out on the file-to-directory transition.
On my to-do list for next week is to try to come up with a minimally
complex test case to demonstrate the problem, as the actual repositories
in question are pretty convoluted and there were a bunch of other
unrelated changes. I didn't mention it before now because I knew my
description was certain to be too vague to be useful without a test case
to look at.
We ended up successfully doing the merge by doing exactly what we had to
do on the Subversion side: first explicitly merge up to the "delete the
file" revision, then merge the "create the directory" revision. After
that git was able to successfully fast-forward us through the subsequent
revisions.
-Steve
next prev parent reply other threads:[~2007-03-18 23:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-18 7:25 [RFH] straightening out "read-tree -m" Junio C Hamano
2007-03-18 12:18 ` Matthias Lederhofer
2007-03-18 16:06 ` Brian Gernhardt
2007-03-18 20:23 ` Junio C Hamano
2007-03-18 23:20 ` Steven Grimm [this message]
2007-03-19 0:04 ` Junio C Hamano
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=45FDC95B.5020106@midwinter.com \
--to=koreth@midwinter.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=matled@gmx.net \
/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).