git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git reference git stash

From
erik88 <erik88@gmail.com>
Date
Mar 6, 2026, 12:29 UTC
Message-ID
<aarHnK-oPHlx_hCw@Eriks-MacBook-Pro.local>
In-Reply-To
<aao7uLxQ0ir0m6s2@exploit>
On 26/03/06 03:31AM, Mirko Faina wrote:
Show 6 quoted lines
> 
> 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.
Previous: Mirko FainaNext: Junio C Hamano
Message 4 of 5 in “Git reference git stash”
  1. Aron SigfridssonMar 5, 2026
  2. Mirko FainaMar 6, 2026
  3. Mirko FainaMar 6, 2026
  4. erik88Mar 6, 2026
  5. Junio C HamanoMar 6, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.