git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] rebase: new convenient option to edit a single commit
Date: Fri, 28 Feb 2014 14:34:16 +0700	[thread overview]
Message-ID: <CACsJy8BC089h3j4H-DV5+BdhK74=k4v+=vO6a26xRJ==BLJ3-Q@mail.gmail.com> (raw)
In-Reply-To: <20140228065802.GB31731@sigill.intra.peff.net>

On Fri, Feb 28, 2014 at 1:58 PM, Jeff King <peff@peff.net> wrote:
> On Thu, Feb 27, 2014 at 08:01:18PM +0700, Nguyễn Thái Ngọc Duy wrote:
>
>> I find myself often do "git rebase -i xxx" and replace one "pick" line
>> with "edit" to amend just one commit when I see something I don't like
>> in that commit. This happens often while cleaning up a series. This
>> automates the "replace" step so it sends me straight to that commit.
>
> Yeah, I do this a lot, too.  The interface you propose makes sense to
> me, though I'm not sure how much I would use it, as I often do not know
> the specifier of the commit I want to change (was it "HEAD~3 or
> HEAD~4?"). I guess using ":/" could make that easier.

In my case, I just copy/paste the commit ID from "git log -lp". I
think :/ already works with rebase..

>
> One comment on the option name:
>
>> +1,edit-one!        generate todo list to edit this commit
>
> I'd expect "-$n" to mean "rebase the last $n commits" (as opposed to
> everything not in the upstream). That does not work currently, of
> course, but:
>
>   1. It has the potential to confuse people who read it, since it's
>      unlike what "-1" means in most of the rest of git.
>
>   2. It closes the door if we want to support "-$n" in the future.

I really like to do "git rebase -5" == "git rebase HEAD~5" but never
gotten around do make it so. "-1/--edit-one" was chosen without much
thought. Will change it to something else.
-- 
Duy

  reply	other threads:[~2014-02-28  7:34 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 13:01 [PATCH/RFC] rebase: new convenient option to edit a single commit Nguyễn Thái Ngọc Duy
2014-02-27 13:52 ` Matthieu Moy
2014-02-28  6:58 ` Jeff King
2014-02-28  7:34   ` Duy Nguyen [this message]
2014-02-28  7:38     ` Jeff King
2014-02-28 17:14   ` Philip Oakley
2014-03-02  2:53 ` [PATCH 0/3] rebase's convenient options Nguyễn Thái Ngọc Duy
2014-03-02  2:53   ` [PATCH 1/3] rev-parse: support OPT_NUMBER_CALLBACK in --parseopt Nguyễn Thái Ngọc Duy
2014-03-04 18:28     ` Junio C Hamano
2014-03-02  2:53   ` [PATCH 2/3] rebase: accept -<number> as another way of saying HEAD~<number> Nguyễn Thái Ngọc Duy
2014-03-02  8:37     ` Eric Sunshine
2014-03-02  8:45       ` Duy Nguyen
2014-03-02  8:53     ` Eric Sunshine
2014-03-02  8:55       ` Eric Sunshine
2014-03-02 15:55         ` Matthieu Moy
2014-03-03  9:16           ` Michael Haggerty
2014-03-03  9:37             ` Matthieu Moy
2014-03-03 10:04               ` Duy Nguyen
2014-03-03 10:11                 ` David Kastrup
2014-03-03 10:12                 ` Matthieu Moy
2014-03-03 10:13               ` Jeff King
2014-03-03 21:48               ` Junio C Hamano
2014-03-03 22:39                 ` Matthieu Moy
2014-03-03 21:44             ` Junio C Hamano
2014-03-02  2:53   ` [PATCH 3/3] rebase: new convenient option to edit a single commit Nguyễn Thái Ngọc Duy
2014-03-02  9:04     ` Eric Sunshine
2014-03-02  9:09       ` Eric Sunshine
2014-03-03 10:10         ` Michael Haggerty
2014-03-03 10:15           ` Duy Nguyen
2014-03-03 10:37             ` David Kastrup
2014-03-03 20:28     ` Eric Sunshine
2014-03-04  2:08       ` Duy Nguyen
2014-03-04  8:59         ` Michael Haggerty
2014-03-04 10:24           ` Duy Nguyen
2014-03-04 13:11             ` Michael Haggerty
2014-03-04 18:37           ` Junio C Hamano
2014-03-09  2:49           ` [PATCH/RFC] rebase: new convenient option to edit/reword/delete " Nguyễn Thái Ngọc Duy
2014-03-09 16:30             ` Matthieu Moy
2014-03-10  8:30             ` Michael Haggerty
2014-03-10  8:41               ` Matthieu Moy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACsJy8BC089h3j4H-DV5+BdhK74=k4v+=vO6a26xRJ==BLJ3-Q@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).