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

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

From
JSJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
Date
Oct 17, 2008, 14:28 UTC
Message-ID
<20081017142832.GF27647@josefsipek.net>
In-Reply-To
<alpine.DEB.1.00.0810170736240.27798@brickies>
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 :)
Show 19 quoted lines
> 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...
Previous: Scott MoserNext: Scott Moser
Message 3 of 4 in “fix guilt-pop and push to fail if no relevant patches”
  1. fix guilt-pop and push to fail if no relevant patchesScott Moser, Sep 29, 2008
  2. Scott MoserOct 17, 2008
  3. Josef 'Jeff' SipekOct 17, 2008
  4. Scott MoserOct 17, 2008

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.