From: Junio C Hamano <gitster@pobox.com>
To: Erik Cervin Edin <erik@cervined.in>
Cc: "lilinchao@oschina.cn" <lilinchao@oschina.cn>, git <git@vger.kernel.org>
Subject: Re: let git-ls-files suppress the expanding of all files in sub directory
Date: Thu, 30 Jun 2022 16:49:04 -0700 [thread overview]
Message-ID: <xmqqv8shaf0v.fsf@gitster.g> (raw)
In-Reply-To: <CA+JQ7M_rd_SdzLOL=a0ok=HL9AZ-q=V2Bc2aTuLRrPW8j7DOqA@mail.gmail.com> (Erik Cervin Edin's message of "Fri, 1 Jul 2022 01:04:21 +0200")
Erik Cervin Edin <erik@cervined.in> writes:
> On Thu, Jun 30, 2022, 8:26 AM lilinchao@oschina.cn <lilinchao@oschina.cn> wrote:
>>
>> As subject said, is this possible for git-ls-files to work like this?:
>> " $ git ls-files --no-recursion
>> a.txt
>> b.txt
>> dir/
>> "
>
> An alternative
> git ls-tree --name-only HEAD
> is suggested here
> https://stackoverflow.com/a/10453994
The index may have different contents from HEAD, so it won't be a
replacement in general.
The index is a flat list of paths, so it is not like you can
suppressing the expansion (to avoid extra work). You have to do
more work to omit paths in subdirectories to create such output.
prev parent reply other threads:[~2022-06-30 23:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 6:14 let git-ls-files suppress the expanding of all files in sub directory lilinchao
2022-06-30 23:04 ` Erik Cervin Edin
2022-06-30 23:49 ` Junio C Hamano [this message]
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=xmqqv8shaf0v.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=erik@cervined.in \
--cc=git@vger.kernel.org \
--cc=lilinchao@oschina.cn \
/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).