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

Re: Is it not bug git stash -- <pathspec> does not work at non-root directory?

From
小小川恭史 <aiueogawa217@gmail.com>
Date
Nov 18, 2017, 04:12 UTC
Message-ID
<CAC2JkrLWVEHvV7tf24bPmVEDpgnrKTFtHR5UHMh+kC8v_fWumA@mail.gmail.com>
In-Reply-To
<xmqqzi7kp7j2.fsf@gitster.mtv.corp.google.com>
> Please make it a habit (not limited to when interacting with _this_

project) to state a bit more than "does not work"; instead, say "it is expected to do X, but instead it does Y, and the difference between X and Y I perceive is Z".

Thanks. I'll rewrite the issue.
Assuming that we have sub/something and something is not included anywhere else,
        cd sub && git stash -- something
 is expected to make a stash for sub/something but instead returns error like
        error: pathspec 'something' did not match any file(s) known to git.
        Did you forget to 'git add'?
.
I don't know what I should write about 'the difference between X and Y is Z'.
2017-11-18 12:53 GMT+09:00 Junio C Hamano <gitster@pobox.com>:
Show 22 quoted lines
> 小川恭史 <aiueogawa217@gmail.com> writes:
>
>> Is it not bug git stash -- <pathspec> does not work at non-root directory?
>
> Please make it a habit (not limited to when interacting with _this_
> project) to state a bit more than "does not work"; instead, say "it
> is expected to do X, but instead it does Y, and the difference
> between X and Y I perceive is Z".
>
> If you mean
>
>         cd sub && git stash -- Makefile
>
> does not make a stash for only sub/Makefile and instead makes (or
> attempts to make) a stash for only Makefile at the top-level, then
> I think it is a bug, whose likely cause is that the implementation
> forgets to prepend the $prefix to the pathspec it got from the
> command line.  But I am writing this without looking at the
> implementation and with your unclear description of the issue, so
> I may be completely off the mark ;-)
>
> Thanks.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Is it not bug git stash -- <pathspec> does not work at non-root directory?”
  1. 小川恭史Nov 18, 2017
  2. Junio C HamanoNov 18, 2017
  3. 小川恭史Nov 18, 2017
  4. Junio C HamanoNov 18, 2017
  5. 小川恭史Nov 18, 2017
  6. Junio C HamanoNov 18, 2017

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.