From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: ls-files -t broken? Or do I just not understand it?
Date: Wed, 19 Aug 2009 16:18:10 +0700 [thread overview]
Message-ID: <fcaeb9bf0908190218x487dd7f4y355e411a8cb1f254@mail.gmail.com> (raw)
In-Reply-To: <20090819091445.GB18860@atjola.homenet>
2009/8/19 Björn Steinbrink <B.Steinbrink@gmx.de>:
> On 2009.08.19 16:04:20 +0700, Nguyen Thai Ngoc Duy wrote:
>> On Wed, Aug 19, 2009 at 3:54 PM, Matthieu Moy<Matthieu.Moy@imag.fr> wrote:
>> > Björn Steinbrink <B.Steinbrink@gmx.de> writes:
>> >
>> >> Hi,
>> >>
>> >> ls-files -t seems to always show status H, even if the file was modified
>> >> or deleted, and thus gets shown by -m and -d respectively.
>> >
>> > That's not exactly "always", but I don't know whether it's the desired
>> > behavior:
>> >
>> > /tmp/git$ git st
>> > # On branch master
>> > # Changed but not updated:
>> > # (use "git add/rm <file>..." to update what will be committed)
>> > # (use "git checkout -- <file>..." to discard changes in working directory)
>> > #
>> > # modified: modified
>> > # deleted: removed
>> > #
>> > no changes added to commit (use "git add" and/or "git commit -a")
>> > /tmp/git$ git ls-files -t
>> > H modified
>> > H removed
>> > H unmodified
>> > /tmp/git$ git ls-files -t -m
>> > C modified
>> > C removed
>> > /tmp/git$ git ls-files -t -d
>> > R removed
>> > $ git ls-files -t -d -m
>> > C modified
>> > R removed
>> > C removed
>> >
>> > So, you get the C and R flags only when you request explicitely -m and
>> > -d.
>>
>> Let's see how it goes without "-t":
>>
>> pclouds@dektop /tmp/i $ git ls-files
>> modified
>> removed
>> unmodified
>> pclouds@dektop /tmp/i $ git ls-files -m
>> modified
>> removed
>> pclouds@dektop /tmp/i $ git ls-files -d
>> removed
>> pclouds@dektop /tmp/i $ git ls-files -d -m
>> modified
>> removed
>> removed
>>
>> I'd say it's expected behavior.
>
> OK, so -t without _more_ than one of -c, -d, -m, -o, -u, -k simply
> doesn't make much sense, right?
It shows you whether it's a normal entry (marked as "H") or unmerged
entry ("M") as far as I can tell. Junio may give more detail
explanation about this command.
--
Duy
next prev parent reply other threads:[~2009-08-19 9:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-19 8:24 ls-files -t broken? Or do I just not understand it? Björn Steinbrink
2009-08-19 8:54 ` Matthieu Moy
2009-08-19 9:04 ` Nguyen Thai Ngoc Duy
2009-08-19 9:14 ` Björn Steinbrink
2009-08-19 9:18 ` Nguyen Thai Ngoc Duy [this message]
2009-08-19 17:45 ` Junio C Hamano
2009-08-19 17:53 ` Matthieu Moy
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=fcaeb9bf0908190218x487dd7f4y355e411a8cb1f254@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=B.Steinbrink@gmx.de \
--cc=Matthieu.Moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).