Subject: Re: Git reference git stash

From: erik88 <[email-masked]>
Date: Fri, 6 Mar 2026 13:29:50 +0100

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.