git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Olivier Marin" <dkr+ml.git@free.fr>,
	"Theodore Tso" <tytso@mit.edu>,
	"Nanako Shiraishi" <nanako3@lavabit.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"René Scharfe" <rene.scharfe@lsrfire.ath.cx>,
	"Joe Fiorini" <joe@faithfulgeek.org>,
	git@vger.kernel.org, "Jari Aalto" <jari.aalto@cante.net>
Subject: Re: [PATCH] Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge"
Date: Wed, 23 Jul 2008 03:13:41 +0200	[thread overview]
Message-ID: <20080723011341.GE5904@leksak.fem-net> (raw)
In-Reply-To: <7vbq0pifwq.fsf@gitster.siamese.dyndns.org>

Hi,

Junio C Hamano wrote:
> Stephan Beyer <s-beyer@gmx.net> writes:
> > Junio C Hamano wrote:
> >> Olivier Marin <dkr+ml.git@free.fr> writes:
> >> > @@ -203,9 +204,10 @@ then
> >> >  
> >> >  	case "$abort" in
> >> >  	t)
> >> > -		rm -fr "$dotest" &&
> >> > +		git rerere clear &&
> >> >  		git read-tree -m -u ORIG_HEAD &&
> > [...]
> >> diff --git a/git-am.sh b/git-am.sh
> >> index a44bd7a..5cbf8f4 100755
> >> --- a/git-am.sh
> >> +++ b/git-am.sh
> >> @@ -203,9 +203,9 @@ then
> >>  
> >>  	case "$abort" in
> >>  	t)
> >> -		rm -fr "$dotest" &&
> >> -		git read-tree -m -u ORIG_HEAD &&
> >> -		git reset ORIG_HEAD && :
> >> +		git rerere clear
> >> +		git read-tree --reset -u HEAD ORIG_HEAD
> >
> > Perhaps I am confused, but ...
> > Why is there "HEAD" and "ORIG_HEAD" and not only "ORIG_HEAD"?
> 
> Just being a bit defensive -- in this case I think it might be Ok to say
> "read-tree --reset -u ORIG_HEAD", but I haven't checked in a conflicted
> case.

Well, the test suite fails:
* FAIL 4: am --abort goes back after failed am

                        git-am --abort &&
                        git rev-parse HEAD >actual &&
                        git rev-parse initial >expect &&
                        test_cmp expect actual &&
  here>                 test_cmp file-2-expect file-2 &&
  ...                   git diff-index --exit-code --cached HEAD &&
                        test ! -f .git/rr-cache/MERGE_RR

* FAIL 7: am --abort goes back after failed am -3

                        git-am --abort &&
                        git rev-parse HEAD >actual &&
                        git rev-parse initial >expect &&
                        test_cmp expect actual &&
 and here>              test_cmp file-2-expect file-2 &&
                        git diff-index --exit-code --cached HEAD &&
                        test ! -f .git/rr-cache/MERGE_RR

So no reason to be defensive ;)

> If some path was added between ORIG_HEAD (that is where we started from)
> and HEAD (that is where we are and we decide we do not want it), and that
> path is conflicted in the index, a single tree form "read-tree --reset -u
> HEAD" would leave it behind in the working tree, wouldn't it?

Seems so.

The reason of my question was that I *blindly* incorporated the change into
sequencer to make it able to work on a dirty working tree and thus to be
able to migrate am onto it without losing the ability to apply patches
on a dirty working tree....
All am tests applied afterwards, but the sequencer and the rebase-i
test suite failed in a place where I didn't expect it. I *then* had
a deeper look at the read-tree line and I was wondering what the "HEAD"
should achieve.
I removed it and all tests passed. (I didn't have t4151 in my branch
at that point.)

Now, because t4151 does not pass, I am wondering what's the best thing
I could do...

Regards,
  Stephan

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

  reply	other threads:[~2008-07-23  1:14 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15 21:08 Git rebase failure: .dotest overwritten Joe Fiorini
2008-07-15 21:22 ` Stephan Beyer
2008-07-15 21:48   ` René Scharfe
2008-07-16  0:47     ` [PATCH] Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge" Johannes Schindelin
2008-07-16  0:57       ` Linus Torvalds
2008-07-16  1:10       ` Junio C Hamano
2008-07-16  1:15         ` Johannes Schindelin
2008-07-16  1:19           ` Junio C Hamano
2008-07-16  1:33             ` [PATCH for master] " Johannes Schindelin
2008-07-16  1:52           ` [PATCH] " Linus Torvalds
2008-07-16  2:30             ` Johannes Schindelin
2008-07-16  3:05               ` Junio C Hamano
2008-07-16 21:27           ` Petr Baudis
2008-07-16 21:44             ` Junio C Hamano
2008-07-16  1:26       ` Theodore Tso
2008-07-16  1:47         ` Stephan Beyer
2008-07-16 19:18         ` Junio C Hamano
2008-07-19 18:40           ` Olivier Marin
2008-07-19 22:18             ` Junio C Hamano
2008-07-19 22:27               ` Junio C Hamano
2008-07-22 23:47               ` Stephan Beyer
2008-07-23  0:48                 ` Junio C Hamano
2008-07-23  1:13                   ` Stephan Beyer [this message]
2008-07-23 14:54                     ` Olivier Marin
2008-07-23 16:47                       ` Stephan Beyer
2008-07-23 20:40                     ` Junio C Hamano
2008-07-23  0:10             ` [PATCH] am --abort: Add to bash-completion and mention in git-rerere documentation Stephan Beyer
2008-07-19 19:49           ` [PATCH] Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge" Olivier Marin
2008-07-19 19:59             ` Stephan Beyer
2008-07-19 20:25               ` Olivier Marin
2008-07-19 21:52             ` Junio C Hamano
2008-07-19 22:39               ` Jakub Narebski
2008-07-21 13:39               ` Olivier Marin
2008-07-23  0:16                 ` Junio C Hamano
2008-07-23 12:24                   ` Olivier Marin
2008-07-23 18:31                     ` Junio C Hamano
2008-07-24 12:44                       ` Olivier Marin

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=20080723011341.GE5904@leksak.fem-net \
    --to=s-beyer@gmx.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=dkr+ml.git@free.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jari.aalto@cante.net \
    --cc=joe@faithfulgeek.org \
    --cc=nanako3@lavabit.com \
    --cc=rene.scharfe@lsrfire.ath.cx \
    --cc=tytso@mit.edu \
    /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).