git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Frank Li <lznuaa@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: unmerged flag at git diff-index
Date: Tue, 20 Jan 2009 18:40:35 -0800	[thread overview]
Message-ID: <7vbpu1js9o.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1976ea660901201813r7b03525ax39fd0e1ecfb1700e@mail.gmail.com> (Frank Li's message of "Wed, 21 Jan 2009 10:13:30 +0800")

Frank Li <lznuaa@gmail.com> writes:

> There are conflict when I call git merge
> git ls-files -u
> 100644 54d05e1c40c686027b611b702e014284e9ab9a31 1       a.c
> 100644 a8a1b77c0d92f33491a0a69a8645f02ececb1eb6 2       a.c
> 100644 642ba972b2234f63048abcca544b3926f94e04ee 3       a.c
>
> but when use git diff-index HEAD
> :100644 100644 a8a1b77c0d92f33491a0a69a8645f02ececb1eb6 0000000000000000000000
> 0000000000000000 M      a.c
>
> a.c flag is M: Modification of the contents or mode of a file.

That is correct.

By asking "git diff-index HEAD", you are asking to compare the work tree
contents through the index against HEAD commit.  The work tree path by
definition cannot be "unmerged" as there is no stages in the work tree.

"git diff-index --cached HEAD" would compare the index against the HEAD
commit, and would say it is unmerged.

  reply	other threads:[~2009-01-21  2:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21  2:13 unmerged flag at git diff-index Frank Li
2009-01-21  2:40 ` Junio C Hamano [this message]
2009-01-21  2:48 ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vbpu1js9o.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=lznuaa@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).