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

Re: [GUILT] Preventing "git push" when guilt patches are applied

From
Per Cederqvist <cederp@opera.com>
Date
Apr 30, 2012, 10:34 UTC
Message-ID
<4F9E6AC6.9070606@opera.com>
In-Reply-To
<CAPc5daV4mK7aLRAm4Ow9TBPf5Tj3B=Qpf0=cRXjbeZoOuoYMKQ@mail.gmail.com>
On 04/19/2012 05:19 PM, Junio C Hamano wrote:
Show 18 quoted lines
> On Thu, Apr 19, 2012 at 12:23 AM, Per Cederqvist<cederp@opera.com>  wrote:
>> I have by accident done "git push" when I intended to write "guilt
>> push" a couple of times.  If there are guilt patches applied when I do
>> this the result is that (part of) my half-finished patch series is
>> pushed to the master branch.  That is of course not good.
>>
>> TopGit avoids this issue since I'm on a separate branch when patches
>> are applied.
>> ...
>> I'd like to add something similar to Guilt, to avoid making this
>> mistake ever again.  (It is quite embarrassing to clean up after you
>> push a couple of half-baked patches.)  But I don't know how the
>> feature should be designed.  Some ideas:
>> ...
>
> Isn't the most obvious one (somehow missing from your list) from your
> observation you
> described earlier to have guilt apply patches on a separate branch?

It wasn't obvious to me, but I think it is a good idea. I've posted an implementation of this here:

http://thread.gmane.org/gmane.comp.version-control.git/196546
Show 7 quoted lines
> Would it also work to set "[push] default = none"?  Then "git push"
> typed by mistake for
> "guilt push" (I am assuming that "$whichever push" does not take any
> other argument,
> and that is the root cause of your fat-finger-embarrassment issue)
> would not push anything
> out.

That would maybe help me, but I would still be reluctant to recommend Guilt to my friends, as I don't want to be the reason they make stupid mistakes. :-)

     /ceder
Previous: Junio C Hamano
Message 3 of 3 in “[GUILT] Preventing "git push" when guilt patches are applied”
  1. Per CederqvistApr 19, 2012
  2. Junio C HamanoApr 19, 2012
  3. Per CederqvistApr 30, 2012

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.