list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Maxim Mazurok <>
To: "Ævar Arnfjörð Bjarmason" <>
Cc: Keith Smiley <>,
Subject: Re: [PATCH] Make stashing nothing exit 1
Date: Sun, 12 Apr 2020 23:08:01 +1000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

> * stash is currently (in the 'next' branch) being rewritten in C. It's
>   a better move at this point to patch that version, this code is about
>   to be deleted.
> * This is missing a corresponding test, and skimming the stash manpage
>   we should document how these exit codes are supposed to act.
> * Shouldn't we do this consistently across all the other sub-commands?
>   Trying some of them seems 'push' may be the odd one out, but maybe
>   I've missed some (and this would/should be covered by
>   tests). I.e. some single test that does a bunch of ops with no
>   entries / nothing to stash and asserts exit codes.

I was doing git automation where I’m doing this:
1. git stash push --keep-index --message all-changes
2. git stash push  --message staged-changed
3. git checkout -B my_branch master
4. git checkout stash -- .
6. git stash drop
7. git stash pop
The goal is to do this for every folder and put changes for this folder in it’s own branch. More info here:

So, I also found that "git stash push” doesn’t return 1 and I think it’s not in line with “git stash pop” behavior.

In my workflow it makes harder to find the problem.

Another problem is that sometimes “git stash” doesn’t seem to work.
You can see by downloading full log from here:
That at the bottom, when processing gapi.client.youtubereporting it says that both stashes (form step 1 and 2) were created, but then when running “git stash list” it shows only one stash.
Because it only happens sometimes, I assume that it may be because filesystem not flushing all the changes immediately.
Any help on this would be appreciated.

Regarding “git stash” return code, do you think it makes sense to add this to C implementation, create tests and find other potential inconsistencies? I would be happy to help. And it seems like other people also are facing this problem because “git stash” doesn’t fail:

Maxim Mazurok

  parent reply	other threads:[~2020-04-12 13:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 23:12 [PATCH] Make stashing nothing exit 1 Keith Smiley
2019-03-23  7:54 ` Ævar Arnfjörð Bjarmason
2019-03-24  3:37   ` Eric Sunshine
2019-03-25 15:29     ` Johannes Schindelin
2020-04-12 13:08   ` Maxim Mazurok [this message]
2019-03-24 12:42 ` Junio C Hamano
2019-05-22 23:57   ` Maksim Odnoletkov
2019-05-23  0:23     ` Ævar Arnfjörð Bjarmason
2019-05-23  6:14     ` Johannes Sixt
2019-05-23  9:49       ` Maksim Odnoletkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).