From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Taylor Blau <me@ttaylorr.com>,
Ilias Apostolou <ilias.apostolou.zero@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Request feature: –no-submodule
Date: Fri, 04 Jun 2021 06:54:10 +0900 [thread overview]
Message-ID: <xmqqo8cm4nst.fsf@gitster.g> (raw)
In-Reply-To: <YLkr+kLdjmHyPjgl@coredump.intra.peff.net> (Jeff King's message of "Thu, 3 Jun 2021 15:22:34 -0400")
Jeff King <peff@peff.net> writes:
> It doesn't seem outrageous to me for Git to automatically populate
> "pseudo-attributes" that connect properties of paths to the attribute
> system.
Sounds sensible. The attribute assignment was designed to purely
depend on paths and not contents, so it might be a bit awkwarad to
implement, but it should be doable.
> An alternative view is allowing a pathspec that asks about the mode:
>
> git ls-files ':(mode=160000)'
>
> That also lets you ask about other things, like:
>
> git ls-files ':(mode=100755)'
>
> but it is probably unnecessarily arcane (even I had to look up the
> correct mode for a gitlink just now :) ).
The original request, as I understand the clarification posted
upthread, is not "submodules are uninteresting", but is "we want
regular files" (and we postprocess further the output), so such a
"mode" (pseudo-)attribute that is automatically populated would be a
better fit anyway. With the current system, they can already do:
git ls-files -s ':(exclude)*.png' ':(exclude)*.ico)' |
sed -n -e 's/^100[76][54][54] [0-9a-f]* 0 //p' |
xargs dos2unix
(cf. <9cc98ca3-bdc5-61bf-450a-99bb47673d6c@gmail.com>)
and with such an auto-pseudo-attribute, presumably something along
this line would work, removing the need for the intermediate filter:
git ls-files \
':(attr:mode=100755)' ':(attr:mode=100644)' \
':(exclude)*.png' ':(exclude)*.ico' |
xargs dos2unix
next prev parent reply other threads:[~2021-06-03 21:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 10:31 Request feature: –no-submodule Ilias Apostolou
2021-06-02 20:31 ` Taylor Blau
2021-06-03 0:55 ` Junio C Hamano
2021-06-03 2:33 ` Taylor Blau
2021-06-03 10:48 ` Ilias Apostolou
2021-06-03 22:06 ` Junio C Hamano
2021-06-03 17:40 ` Junio C Hamano
2021-06-03 19:22 ` Jeff King
2021-06-03 21:54 ` Junio C Hamano [this message]
2021-06-04 4:03 ` Jeff King
2021-06-04 5:06 ` Junio C Hamano
2021-06-05 5:45 ` Ilias Apostolou
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=xmqqo8cm4nst.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ilias.apostolou.zero@gmail.com \
--cc=me@ttaylorr.com \
--cc=peff@peff.net \
/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).