public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail•com>
To: "Julia Evans" <julia@jvns•ca>,
	"D. Ben Knoble" <ben.knoble@gmail•com>,
	"Josh Soref" <gitgitgadget@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH v4 0/7] doc: git-checkout: clarify DESCRIPTION section
Date: Fri, 12 Sep 2025 16:26:36 +0200	[thread overview]
Message-ID: <35faaf30-6326-4784-80ff-723c20ed6b13@app.fastmail.com> (raw)
In-Reply-To: <236a79f4-e9a2-4335-bbff-79ae0cc67e9b@app.fastmail.com>

On Fri, Sep 12, 2025, at 16:05, Julia Evans wrote:
>> OTOH, I’ll take a look at the docs after this series lands and see if
>> it feels like something is missing. It may be just fine to have
>> pathspecs in the synopses and add a sentence somewhere after the gentle
>> introduction “For more ways to specify paths, see…”
>
> Sorry for not mentioning that. My idea was to just leave <pathspec> in the
> synopsis, and then folks can look it up in the glossary if they're curious.
>
> In the web documentation (https://git-scm.com/docs/git-checkout), the word
> "pathspec" is underlined, and hovering over it will show the definition, which
> I think will help with discoverability. Of course in the terminal version of the
> man pages it's harder to build in affordances like that.
>
> Do you think that the concept of a "pathspec" is especially useful/powerful
> in the case of `git checkout`? If we're thinking more globally, i wonder if we
> could find a Git command where more complex pathspecs are especiallly
> useful and then include some examples of using a complex pathspec there.
>
> If we include a compelling example and then a "see X for more about..." (here or
> somewhere else) I think it would be much more likely to motivate users to follow
> the breadcrumbs to learn more.

I think pathspecs are great for git-grep(1).

    # Docs but ignore release notes
    git grep loop -- Documentation/ ':^Documentation/RelNotes'
    # Just the git(1) manuals (more or less)
    git grep loop -- 'Documentation/git-*adoc'

And also for narrowing a git-diff(1), like ignoring `pom.xml` changes in
a Java project.

(But I never got into the habit of using them with git-checkout(1))

But once you learn about them you indeed can find uses for them in a lot
of corners.  I used them today and yesterday to selectively git-clean(1)
and git-rm(1).

There should be a gitpathspecs(7).  Not just a glossary entry.

  reply	other threads:[~2025-09-12 14:26 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-25 19:08 [PATCH 0/5] doc: git-checkout: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-25 19:08 ` [PATCH 1/5] doc: git-checkout: clarify intro Julia Evans via GitGitGadget
2025-08-26 18:46   ` Junio C Hamano
2025-08-26 18:51     ` Junio C Hamano
2025-08-26 20:56     ` Julia Evans
2025-08-28 14:00   ` D. Ben Knoble
2025-08-28 22:34     ` Julia Evans
2025-08-28 23:44       ` Junio C Hamano
2025-08-29 13:39         ` D. Ben Knoble
2025-08-29 21:00     ` Junio C Hamano
2025-09-03 23:48       ` D. Ben Knoble
2025-08-25 19:08 ` [PATCH 2/5] doc: git-checkout: clarify `git checkout <branch>` Julia Evans via GitGitGadget
2025-08-26 21:38   ` Junio C Hamano
2025-08-28 12:11     ` Julia Evans
2025-08-28 15:45       ` Junio C Hamano
2025-08-28 18:24         ` Julia Evans
2025-08-25 19:08 ` [PATCH 3/5] doc: git-checkout: don't use "reset" Julia Evans via GitGitGadget
2025-08-25 19:08 ` [PATCH 4/5] doc: git-checkout: deduplicate --detach explanation Julia Evans via GitGitGadget
2025-08-25 19:08 ` [PATCH 5/5] doc: git-checkout: clarify restoring files section Julia Evans via GitGitGadget
2025-08-26 22:43   ` Junio C Hamano
2025-08-28 13:26     ` Julia Evans
2025-08-28 19:08   ` D. Ben Knoble
2025-08-28 19:59     ` Julia Evans
2025-08-28 20:38       ` Junio C Hamano
2025-08-29 13:48       ` D. Ben Knoble
2025-08-29 11:45 ` [PATCH v2 0/5] doc: git-checkout: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-29 11:45   ` [PATCH v2 1/5] doc: git-checkout: clarify intro Julia Evans via GitGitGadget
2025-08-29 15:58     ` Junio C Hamano
2025-09-02 17:14       ` Julia Evans
2025-08-29 11:45   ` [PATCH v2 2/5] doc: git-checkout: clarify `git checkout <branch>` Julia Evans via GitGitGadget
2025-08-29 16:03     ` Junio C Hamano
2025-09-02 17:16       ` Julia Evans
2025-08-29 11:45   ` [PATCH v2 3/5] doc: git-checkout: don't use "reset" Julia Evans via GitGitGadget
2025-08-29 16:22     ` Junio C Hamano
2025-09-01 14:28       ` Julia Evans
2025-09-02 16:10         ` Junio C Hamano
2025-08-29 11:45   ` [PATCH v2 4/5] doc: git-checkout: deduplicate --detach explanation Julia Evans via GitGitGadget
2025-08-29 11:45   ` [PATCH v2 5/5] doc: git-checkout: clarify restoring files section Julia Evans via GitGitGadget
2025-09-03 16:49   ` [PATCH v3 0/6] doc: git-checkout: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-09-03 16:49     ` [PATCH v3 1/6] doc: git-checkout: clarify intro Julia Evans via GitGitGadget
2025-09-03 16:49     ` [PATCH v3 2/6] doc: git-checkout: clarify `git checkout <branch>` Julia Evans via GitGitGadget
2025-09-03 16:49     ` [PATCH v3 3/6] doc: git-checkout: clarify `-b` and `-B` Julia Evans via GitGitGadget
2025-09-03 16:50     ` [PATCH v3 4/6] doc: git-checkout: deduplicate --detach explanation Julia Evans via GitGitGadget
2025-09-03 16:50     ` [PATCH v3 5/6] doc: git-checkout: split up restoring files section Julia Evans via GitGitGadget
2025-09-03 16:50     ` [PATCH v3 6/6] doc: git-checkout: clarify " Julia Evans via GitGitGadget
2025-09-03 21:29       ` Junio C Hamano
2025-09-03 21:09     ` [PATCH v3 0/6] doc: git-checkout: clarify DESCRIPTION section Junio C Hamano
2025-09-03 21:28       ` Julia Evans
2025-09-10 19:14     ` [PATCH v4 0/7] " Julia Evans via GitGitGadget
2025-09-10 19:14       ` [PATCH v4 1/7] doc: git-checkout: clarify intro sentence Julia Evans via GitGitGadget
2025-09-10 19:14       ` [PATCH v4 2/7] doc: git-checkout: clarify ARGUMENT DISAMBIGUATION Julia Evans via GitGitGadget
2025-09-10 19:14       ` [PATCH v4 3/7] doc: git-checkout: clarify `git checkout <branch>` Julia Evans via GitGitGadget
2025-09-10 19:14       ` [PATCH v4 4/7] doc: git-checkout: clarify `-b` and `-B` Julia Evans via GitGitGadget
2025-09-29 18:07         ` Kristoffer Haugsbakk
2025-10-02 18:37           ` [PATCH] doc: git-checkout: fix placeholder markup kristofferhaugsbakk
2025-10-16 22:11             ` [PATCH resend] " kristofferhaugsbakk
2025-10-17 13:56               ` Julia Evans
2025-10-17 15:50               ` [PATCH v2] " kristofferhaugsbakk
2025-09-10 19:14       ` [PATCH v4 5/7] doc: git-checkout: deduplicate --detach explanation Julia Evans via GitGitGadget
2025-09-10 19:14       ` [PATCH v4 6/7] doc: git-checkout: split up restoring files section Julia Evans via GitGitGadget
2025-09-10 19:14       ` [PATCH v4 7/7] doc: git-checkout: clarify " Julia Evans via GitGitGadget
2025-09-11 13:01       ` [PATCH v4 0/7] doc: git-checkout: clarify DESCRIPTION section Ben Knoble
2025-09-12 14:05         ` Julia Evans
2025-09-12 14:26           ` Kristoffer Haugsbakk [this message]
2025-09-15 23:22             ` Junio C Hamano
2025-09-16  6:41               ` Kristoffer Haugsbakk
2025-09-12 16:23           ` Junio C Hamano
2025-09-17 18:38       ` Junio C Hamano

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=35faaf30-6326-4784-80ff-723c20ed6b13@app.fastmail.com \
    --to=kristofferhaugsbakk@fastmail$(echo .)com \
    --cc=ben.knoble@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitgitgadget@gmail$(echo .)com \
    --cc=julia@jvns$(echo .)ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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