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

Re: [PATCH] rebase -i: support single-letter abbreviations for the actions

From
AKAvi Kivity <avi@qumranet.com>
Date
Sep 29, 2007, 21:13 UTC
Message-ID
<46FEC00B.7050208@qumranet.com>
In-Reply-To
<Pine.LNX.4.64.0709292156090.28395@racer.site>
Johannes Schindelin wrote:
Show 27 quoted lines
> Hi,
>
> On Sat, 29 Sep 2007, Avi Kivity wrote:
>
>   
>> Johannes Schindelin wrote:
>>     
>>> When you do many rebases, you can get annoyed by having to type out 
>>> the actions "edit" or "squash" in total.
>>>
>>> This commit helps that, by allowing you to enter "e" instead of 
>>> "edit", or "s" instead of "squash", and it also plays nice with 
>>> "merge" or "amend" as synonyms to "squash".
>>>       
>> Can we make "amend" like squash, except that it keeps the first commit's 
>> authorship instead of the second?  I often merge a commit with some 
>> minor fix that comes later, and usually want to keep the original author 
>> record.
>>     
>
> I do not necessarily think it is not doable, but I have different 
> suggestion to you:
>
> If you amend the commit with a minor fix that comes later, why not do 
> "rebase -i" _before_ applying the fix, and then using "edit" on the 
> respective commit?
>   

This is what I do now. Edit the commit, cherry-pick -n, and commit --amend. But it's less pleasant than using the rebase --interactive interface.

[This is part of the workflow to prepare a patchset for submitting upstream; I don't edit commits on my master branch]

> That way you can even test the result easily, which you cannot do with 
> "squash".
>   

Usually these are trivial fixes, and have already been tested by being included in my main branch.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 6 of 9 in “rebase -i: support single-letter abbreviations for the actions”
  1. rebase -i: support single-letter abbreviations for the actionsJohannes Schindelin, Sep 29, 2007
  2. Junio C HamanoSep 29, 2007
  3. rebase -i: support single-letter abbreviations for the actionsJohannes Schindelin, Sep 29, 2007
  4. Avi KivitySep 29, 2007
  5. Johannes SchindelinSep 29, 2007
  6. Avi KivitySep 29, 2007
  7. Johannes SchindelinSep 29, 2007
  8. Junio C HamanoSep 29, 2007
  9. rebase -i: squash should retain the authorship of the _first_ commitJohannes Schindelin, Sep 29, 2007

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.