Re: [PATCH] fix guilt-pop and push to fail if no relevant patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 17, 2008 at 07:37:33AM -0400, Scott Moser wrote:
> Jeff,
>    Did you not like the patch below for some reason ?

I don't remember my train of thought, but I ended up making a simpler patch
to address the push-pushing-more-than-it-should bug. I completely missed the
part about the exit codes.

>    It seemed fairly straightforward to me that guilt-pop and guilt-push
> should exit failure if they did not do anything due to having nothing to
> do.

I'd actually say that it's not obvious, but...see below :)

> On Mon, 29 Sep 2008, Scott Moser wrote:
> > currently guilt-pop and guilt-push will exit with '0' if there are no more
> > relevant patches in the series (ie, if you've pushed or popped all of them)
> >
> > This means that you cannot do something like:
> >   while guilt-push; do
> >     guilt refresh || break
> >   done
> >
> > for reference, quilt does exit with non-zero in those cases:
> >   $ quilt push -a && quilt push
> >   File series fully applied, ends at patch my.patch
> >   $ echo $?
> >   1
> >
> >   $ quilt pop -a; quilt pop
> >   No patch removed
> >   $ echo $?
> >   2

Who am I to argue against compatibility.

...
> > diff --git a/guilt-push b/guilt-push
> > index 018f9ac..48f886b 100755
> > --- a/guilt-push
> > +++ b/guilt-push
[snipped long diff]

With my fix, this should be a 2-liner :)

Sorry for missing the return code part...

Josef 'Jeff' Sipek.

-- 
We have joy, we have fun, we have Linux on a Sun...
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux