git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Phil Hord <phil.hord@gmail.com>, git@vger.kernel.org
Subject: Re: MERGE_RR droppings
Date: Mon, 25 Jun 2012 21:31:16 -0700	[thread overview]
Message-ID: <CAJDDKr7Hj4f-Gww4j89kppR8g1vzmhmydsFnG0ecjzL5WrRP4g@mail.gmail.com> (raw)
In-Reply-To: <7vwr2vfc1c.fsf@alter.siamese.dyndns.org>

On Mon, Jun 25, 2012 at 12:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Phil Hord <phil.hord@gmail.com> writes:
>>
>>> git mergetool decides to use rerere-remaining based on the existence
>>> of the .git/MERGE_RR file:
>>>
>>>     if test -e "$GIT_DIR/MERGE_RR"
>>
>> This is correct, I would probably write it with "test -f" if I were
>> writing this line today, though.  After you commit to conclude the
>> merge, the MERGE_RR marker should disappear.  Isn't it happening for
>> you?
>
> Oops.  It actually does not happen for _me_. An empty MERGE_RR is
> left in the working tree after rerere has dealt with the conflicts.
> There seems to be only three codepaths that explicitly remove
> MERGE_RR that is stale:
>
>  - (obviously) "rerere clear"
>  - "git reset"
>  - "git checkout otherbranch"
>
> Perhaps mergetool should consider a missing MERGE_RR and an empty
> one the same way?

Would that test look (roughly) like this?

    if test -f "$GIT_DIR/MERGE_RR" && test -n "$(cat "$GIT_DIR/MERGE_RR")"
    then
	files=$(git rerere remaining)
    else
	files=$(git ls-files -u | sed -e 's/^[^	]*	//' | sort -u)
    fi
    ...

If so I'll throw together a patch.
-- 
David

  reply	other threads:[~2012-06-26  4:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CABURp0omkVoLrz29GeOjjoZOpN238Rm6Nu5aOKQyVxFVnPihsw@mail.gmail.com>
2012-06-18 22:41 ` MERGE_RR droppings Phil Hord
2012-06-18 23:05   ` Junio C Hamano
2012-06-25 18:36     ` Phil Hord
2012-06-25 19:04     ` Junio C Hamano
2012-06-26  4:31       ` David Aguilar [this message]
2012-06-26  5:30         ` Junio C Hamano
2012-06-26 18:04   ` Junio C Hamano
2012-06-26 19:00     ` Phil Hord
2012-07-01  0:19       ` David Aguilar
2012-07-02  7:10         ` Junio C Hamano
2012-07-02 19:36           ` Phil Hord

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=CAJDDKr7Hj4f-Gww4j89kppR8g1vzmhmydsFnG0ecjzL5WrRP4g@mail.gmail.com \
    --to=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phil.hord@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).