git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Michal Sojka <sojka@os.inf.tu-dresden.de>
Cc: git@vger.kernel.org, paulus@samba.org
Subject: Re: [PATCH RFC] gitk: Allow commit editing
Date: Thu, 18 Aug 2011 15:33:47 -0700	[thread overview]
Message-ID: <20110818223346.GA8481@sigill.intra.peff.net> (raw)
In-Reply-To: <1313610971-1741-1-git-send-email-sojka@os.inf.tu-dresden.de>

On Wed, Aug 17, 2011 at 09:56:11PM +0200, Michal Sojka wrote:

> Hi, this is a proof of concept patch that allows editing of commits
> from gitk. I often review patches before pushing in gitk and if I
> would like to have an easy way of fixing typos in commit messages etc.
> 
> So the patch adds "Edit this commit" item to gitk's context menu and
> the actual editing is done by non-interactively invoking interactive
> rebase :-) and git gui.

Invoking rebase behind the scenes makes me very nervous. In particular:

  1. There is nothing to indicate to the user that they are rewriting a
     string of commits, which is going to wreak havoc if any of the
     commits have been published elsewhere (either pushed somewhere, or
     even present in another local branch). I.e., rebasing generally
     needs to be a conscious decision of the user.

     Yes, a veteran user who thinks about it will realize there is no
     way to edit an old commit without rebasing, but I suspect relying
     on that is not enough. There should probably be a prominent
     warning at least the first time somebody uses this feature.

  2. Even if you accept the hazard of rewriting commits, you don't pass
     "-p" to rebase. So it will linearize your history. I don't know how
     robust "-p" is these days, and if it's up to the challenge of
     people using it to rebase potentially large segments of complex
     history.

So I think your idea is sane, and if you use it appropriately (by
editing commits in recent-ish linear stretches of history) your patch
works fine. But I really worry that it is going to be a problem for less
clueful users to stumble across in the menu.

-Peff

  reply	other threads:[~2011-08-18 22:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 19:56 [PATCH RFC] gitk: Allow commit editing Michal Sojka
2011-08-18 22:33 ` Jeff King [this message]
2011-08-19 11:44   ` Chris Packham
2011-08-19 13:34     ` Michal Sojka
2011-08-19 14:40       ` Michal Sojka
2011-08-19 12:23   ` Michal Sojka
2011-08-19 12:25     ` [PATCH] " Michal Sojka
2011-08-25  3:14       ` Jeff King
2011-08-25 13:15         ` [PATCH v3] " Michal Sojka
2011-08-25 17:30           ` Jeff King
2011-08-27 12:31             ` [PATCH v4] " Michal Sojka
2011-09-07 20:10               ` Jeff King
2011-09-08 20:59               ` Paul Mackerras
2011-09-13 23:11                 ` Michal Sojka
2011-08-25  3:07     ` [PATCH RFC] " Jeff King

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=20110818223346.GA8481@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=sojka@os.inf.tu-dresden.de \
    /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).