Re: [PATCH] Make stashing nothing exit 1

2019-05-23 Thread Maksim Odnoletkov
> On 23 May 2019, at 07:14, Johannes Sixt wrote: > >> Am 23.05.19 um 01:57 schrieb Maksim Odnoletkov: >> The problem with current behaviour is it makes it hard to use stash in >> scripts. A natural stash use case is: wrap some operation requiring a >> clean working tree with a stash push-pop pair.

Re: [PATCH] Make stashing nothing exit 1

2019-05-22 Thread Johannes Sixt
Am 23.05.19 um 01:57 schrieb Maksim Odnoletkov: > The problem with current behaviour is it makes it hard to use stash in > scripts. A natural stash use case is: wrap some operation requiring a > clean working tree with a stash push-pop pair. But that doesn't work > properly when working tree is alr

Re: [PATCH] Make stashing nothing exit 1

2019-05-22 Thread Ævar Arnfjörð Bjarmason
On Thu, May 23 2019, Maksim Odnoletkov wrote: > Junio C Hamano writes: > >> Keith Smiley writes: >> >> > In the case there are no files to stash, but the user asked to stash, we >> > should exit 1 since the stashing failed. >> > --- >> >> Sorry, but I fail to see why this is a good change. Di

Re: [PATCH] Make stashing nothing exit 1

2019-05-22 Thread Maksim Odnoletkov
Junio C Hamano writes: > Keith Smiley writes: > > > In the case there are no files to stash, but the user asked to stash, we > > should exit 1 since the stashing failed. > > --- > > Sorry, but I fail to see why this is a good change. Did you have > some script that wanted the exit code from "

Re: [PATCH] Make stashing nothing exit 1

2019-03-25 Thread Johannes Schindelin
Hi Eric, On Sat, 23 Mar 2019, Eric Sunshine wrote: > On Sat, Mar 23, 2019 at 3:54 AM Ævar Arnfjörð Bjarmason > wrote: > > On Sat, Mar 23 2019, Keith Smiley wrote: > > > In the case there are no files to stash, but the user asked to stash, we > > > should exit 1 since the stashing failed. > > > -

Re: [PATCH] Make stashing nothing exit 1

2019-03-24 Thread Junio C Hamano
Keith Smiley writes: > In the case there are no files to stash, but the user asked to stash, we > should exit 1 since the stashing failed. > --- Sorry, but I fail to see why this is a good change. Did you have some script that wanted the exit code from "git stash" to indicate if it had anything

Re: [PATCH] Make stashing nothing exit 1

2019-03-23 Thread Eric Sunshine
On Sat, Mar 23, 2019 at 3:54 AM Ævar Arnfjörð Bjarmason wrote: > On Sat, Mar 23 2019, Keith Smiley wrote: > > In the case there are no files to stash, but the user asked to stash, we > > should exit 1 since the stashing failed. > > --- > > diff --git a/git-stash.sh b/git-stash.sh > > @@ -318,7 +31

Re: [PATCH] Make stashing nothing exit 1

2019-03-23 Thread Ævar Arnfjörð Bjarmason
On Sat, Mar 23 2019, Keith Smiley wrote: > In the case there are no files to stash, but the user asked to stash, we > should exit 1 since the stashing failed. > --- > git-stash.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/git-stash.sh b/git-stash.sh > index 789ce2

[PATCH] Make stashing nothing exit 1

2019-03-22 Thread Keith Smiley
In the case there are no files to stash, but the user asked to stash, we should exit 1 since the stashing failed. --- git-stash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-stash.sh b/git-stash.sh index 789ce2f41d4a3..ca362b1a31277 100755 --- a/git-stash.sh +++ b/git-