git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olivier Goffart <ogoffart@kde.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: Ability to edit message from git rebase --interactive.
Date: Fri, 10 Apr 2009 14:17:50 +0200	[thread overview]
Message-ID: <200904101417.56422.ogoffart@kde.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0903172329480.10279@pacific.mpi-cbg.de>


[-- Attachment #1.1: Type: text/plain, Size: 1269 bytes --]

Le Tirsdag 17 mars 2009, Johannes Schindelin a écrit :
> Hi,
>
> On Tue, 17 Mar 2009, Olivier Goffart wrote:
> > I use git in a workflow in wich we often need to edit the message logs
> > of some commits. The way we do it is using git rebase -i and choose
> > edit.  But then you need to do git commit --amend and git rebase
> > --continue, which is error prone and add more useless steps.
> >
> > The attached patch add a new keyword to git rebase interactive to just
> > edit the message log.
> >
> > I was told on IRC that this has been discussed already not so long ago,
> > and looking on the archive[1], all i seen was bikesheeding .  Here is a
> > patch :-)
>
> Unfortunately, the implementation is not the problem, but picking the best
> name.  The first letter "m" will be taken in a short while by the "merge"
> command for "rebase -i -p", so "message" is out, sadly.
>
> But the "rephrase" command will be part of the "rebase -i -p" series when
> I will finally be able to submit it.

Hi,
Sorry I'm late to reply :-)

I still think this feature to edit the message in git rebase -i is really 
usefull.  So 'm' is really taken, what about 'r' for 'rephrase'?

or maybe 'rephrase' is something different?

Regards
-- 
Olivier

[-- Attachment #1.2: rephrase.diff --]
[-- Type: text/x-diff, Size: 1160 bytes --]

commit 5d784b748328c7bccfddab7edba5a9dcf70518b8
Author: Olivier Goffart <ogoffart@kde.org>
Date:   Tue Mar 17 19:41:40 2009 +0100

    rebase interactive: add the possibility to easily edit the message log of commits

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 314cd36..91714d6 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -406,6 +406,16 @@ do_next () {
 			die_with_patch $sha1 ""
 		fi
 		;;
+	rephrase|r)
+		comment_for_reflog message
+
+		mark_action_done
+
+		pick_one $sha1 ||
+			die_with_patch $sha1 "Could not apply $sha1... $rest"
+
+		git commit --amend || failed=t
+		;;
 	*)
 		warn "Unknown command: $command $sha1 $rest"
 		die_with_patch $sha1 "Please fix this in the file $TODO."
@@ -754,6 +764,7 @@ first and then run 'git rebase --continue' again."
 #  p, pick = use commit
 #  e, edit = use commit, but stop for amending
 #  s, squash = use commit, but meld into previous commit
+#  r, rephrase = use commit and promt the editor to edit the message log
 #
 # If you remove a line here THAT COMMIT WILL BE LOST.
 # However, if you remove everything, the rebase will be aborted.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2009-04-10 12:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17 18:53 Ability to edit message from git rebase --interactive Olivier Goffart
2009-03-17 22:31 ` Johannes Schindelin
2009-03-18  0:40   ` Jeff King
2009-03-18  0:58     ` Johannes Schindelin
2009-03-18  1:06     ` Junio C Hamano
2009-03-18  5:42       ` Sverre Rabbelier
2009-03-18  9:54         ` Michael J Gruber
2009-03-18 14:52           ` Marcel M. Cary
2009-03-18 21:02             ` Marcel M. Cary
2009-04-10 12:17   ` Olivier Goffart [this message]
2009-04-10 12:37     ` Michael Witten
2009-04-10 12:41       ` Michael Witten
2009-04-10 18:21       ` Johannes Schindelin
2009-04-10 18:50         ` Michael Witten
2009-04-10 18:54           ` Sverre Rabbelier
2009-04-10 19:04             ` Michael Witten

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

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

  git send-email \
    --in-reply-to=200904101417.56422.ogoffart@kde.org \
    --to=ogoffart@kde.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).