On Tue, Apr 3, 2018 at 5:38 PM, Paul-Sebastian Ungureanu <ungureanupaulsebastian@xxxxxxxxx> wrote: > On 25.03.2018 10:08, Eric Sunshine wrote: >> On Sat, Mar 24, 2018 at 2:23 PM, Paul-Sebastian Ungureanu >> <ungureanupaulsebastian@xxxxxxxxx> 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.