git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: skimo@liacs.nl
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 4/4] Add git-rewrite-commits
Date: Sun, 8 Jul 2007 17:37:22 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0707081729040.4248@racer.site> (raw)
In-Reply-To: <1183911808787-git-send-email-skimo@liacs.nl>

Hi,

On Sun, 8 Jul 2007, skimo@liacs.nl wrote:

> 	bash-3.00$ time git-filter-branch test
> 	Rewrite 274fe3dfb8e8c7d0a6ce05138bdb650de7b459ea (425/425)
> 	Rewritten history saved to the test branch
> 
> 	real    0m30.845s
> 	user    0m13.400s
> 	sys     0m19.640s
> 
> 	bash-3.00$ time git-rewrite-commits
> 
> 	real    0m0.223s
> 	user    0m0.080s
> 	sys     0m0.140s

That is to be expected.  After all, the first is a script.  However, I 
really have ask: how often per hour do you want to run that program?

> The command line is more reminiscent of git-log.
> For example you can say
> 
> 	git-rewrite-commits --all
> 
> to incorporate grafts in all branches, or
> 
> 	git rewrite-commits --author='!Darl McBribe' --all
> 
> to remove all commits by Darl McBribe.

I am really unhappy that so much is talked about filtering out commits.  
That is amost certainly not what you want in most cases.  In particular, I 
suspect that most users would expect the _changes_ filtered out by such a 
command, which is just not true.

Further, I do not see much value in making this operation faster.  It is 
meant to be a one-time operation, for example when you open-source a 
product and have to cull a lot of history that you must not show for legal 
reasons.  It is a one-shot operation.  And having a script which works 
reliably is more valuable than having two programs, each with its own set 
of bugs.

So there are two things I see here that filter-branch cannot do yet.  The 
first is to rewrite _all_ branches, which should be easy to do, it only 
has to be done.

The second is to rewrite the commit messages so that the hashes are 
mapped, too.  But that should be relatively easy, too: you can provide a 
message filter, and you can use the provided "map" function.  If this 
seems to be what many people need, you can write a simple function and put 
it into filter-branch for common use.

BTW I am not at all opposed to changing the name from filter-branch to 
something that fits better.

Ciao,
Dscho

  reply	other threads:[~2007-07-08 16:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08 16:23 [PATCH 0/4] Add git-rewrite-commits skimo
2007-07-08 16:23 ` [PATCH 1/4] export get_short_sha1 skimo
2007-07-08 16:23 ` [PATCH 2/4] export add_ref_decoration skimo
2007-07-08 16:23 ` [PATCH 3/4] revision: mark commits that didn't match a pattern for later use skimo
2007-07-08 16:23 ` [PATCH 4/4] Add git-rewrite-commits skimo
2007-07-08 16:37   ` Johannes Schindelin [this message]
2007-07-08 17:30     ` Sven Verdoolaege
2007-07-08 18:17       ` Johannes Schindelin
2007-07-08 19:11         ` Sven Verdoolaege
2007-07-08 18:04     ` Steven Grimm
2007-07-08 18:15       ` Sven Verdoolaege
2007-07-08 18:41       ` Johannes Schindelin
2007-07-08 21:10         ` Sven Verdoolaege
2007-07-09  9:01           ` Johannes Sixt
2007-07-09  9:48             ` Sven Verdoolaege
2007-07-09 11:57             ` Johannes Schindelin
2007-07-08 23:56   ` Johannes Schindelin
2007-07-09  9:47     ` Sven Verdoolaege
2007-07-09 12:57       ` Johannes Schindelin
2007-07-09 13:49         ` Sven Verdoolaege
2007-07-09 14:11           ` Johannes Schindelin
2007-07-09 14:42             ` Sven Verdoolaege
2007-07-09 14:59               ` Johannes Schindelin
2007-07-09 12:36     ` Jeff King
2007-07-09 13:16       ` Johannes Schindelin

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=Pine.LNX.4.64.0707081729040.4248@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=skimo@liacs.nl \
    /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).