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

Re: [RFC][PATCH] git-stash: convert git stash list to C builtin

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 7, 2018, 08:56 UTC
Message-ID
<CAPig+cSMv0p6m1kjNN4bGN8prX-9Ri_XbVzHah=MugHmZh46+w@mail.gmail.com>
In-Reply-To
<63772b7d-7b1e-2a3a-b12c-2dae9e254b68@gmail.com>

On Tue, Apr 3, 2018 at 5:38 PM, Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com> wrote:

Show 13 quoted lines
> On 25.03.2018 10:08, Eric Sunshine wrote:
>> On Sat, Mar 24, 2018 at 2:23 PM, Paul-Sebastian Ungureanu
>> <ungureanupaulsebastian@gmail.com> wrote:
>>> diff --git a/git.c b/git.c
>>> @@ -466,6 +466,7 @@ static struct cmd_struct commands[] = {
>>>          { "stage", cmd_add, RUN_SETUP | NEED_WORK_TREE },
>>> +       { "stash--helper", cmd_stash__helper, RUN_SETUP },
>>
>> You don't require a working tree? Seems odd for git-stash.
>
> For now, I do not think that it is necessary (for stash list), but I am
> pretty sure that it will be required in the future when porting other
> commands.
The existing git-stash requires a working directory:

% git stash list fatal: not a git repository (or any of the parent directories): .git %

so it would make sense for the C port to follow suit.

More generally, a stash is a temporary storage area for changes to the _work tree_ (and index). Without a work tree, you wouldn't be able to create any stashes in the first place, so "git stash list" without a work tree would be meaningless.

Previous: Paul-Sebastian UngureanuNext: Eric Sunshine
Message 7 of 9 in “git-stash: convert git stash list to C builtin”
  1. Paul-Sebastian UngureanuMar 24, 2018
  2. Eric SunshineMar 25, 2018
  3. Johannes SchindelinMar 26, 2018
  4. Thomas GummererMar 26, 2018
  5. Johannes SchindelinMar 30, 2018
  6. Paul-Sebastian UngureanuApr 3, 2018
  7. Eric SunshineApr 7, 2018
  8. Eric SunshineApr 7, 2018
  9. Thomas GummererMar 25, 2018

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.