public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: erik88 <erik88@gmail.com>
To: Mirko Faina <mroik@delayed.space>
Cc: Aron Sigfridsson <aron.sigfridsson@gmail.com>, git@vger.kernel.org
Subject: Re: Git reference git stash
Date: Fri, 6 Mar 2026 13:29:50 +0100	[thread overview]
Message-ID: <aarHnK-oPHlx_hCw@Eriks-MacBook-Pro.local> (raw)
In-Reply-To: <aao7uLxQ0ir0m6s2@exploit>

On 26/03/06 03:31AM, Mirko Faina wrote:
> 
> Looking at the docs for other commands that use pathspec, it doesn't
> look like any of them explicitly say if it's toplevel or relative
> neither. I suppose the author thought it was obvious which one it was,
> besides, it can be easily checked just by trying out the command.
> 

Pretty sure git stash push is the only one which does pathspec

    git stash -h
    usage: git stash list [<log-options>]
       ...
       or: git stash [push [-p | --patch] [-S | --staged] [-k | --[no-]
                     [-u | --include-untracked] [-a | --all] [(-m | --m
                     [--pathspec-from-file=<file> [--pathspec-file-nul]
                     [--] [<pathspec>...]]

and pretty sure it's relative.

Sadly, git stash list does not allow a pathspec, despite the
[<log-options>]. But if you want you can do

    git log stash [<log-options>] [--] [<pathspec>]

instead, which is handy sometimes.

  reply	other threads:[~2026-03-06 12:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-05 20:07 Git reference git stash Aron Sigfridsson
2026-03-06  2:09 ` Mirko Faina
2026-03-06  2:31   ` Mirko Faina
2026-03-06 12:29     ` erik88 [this message]
2026-03-06 21:50       ` 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=aarHnK-oPHlx_hCw@Eriks-MacBook-Pro.local \
    --to=erik88@gmail.com \
    --cc=aron.sigfridsson@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mroik@delayed.space \
    /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