git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Stephen Haberman <stephen@exigencecorp.com>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	Thomas Rast <trast@student.ethz.ch>,
	Git Mailing List <git@vger.kernel.org>,
	Stephan Beyer <s-beyer@gmx.net>,
	Christian Couder <chriscool@tuxfamily.org>,
	Daniel Barkalow <barkalow@iabervon.org>
Subject: Re: [PATCH v2] rebase -i: avoid 'git reset' when possible
Date: Tue, 03 Mar 2009 12:19:44 +0100	[thread overview]
Message-ID: <49AD1250.4080708@viscovery.net> (raw)
In-Reply-To: <alpine.DEB.1.00.0903031024420.6399@intel-tinevez-2-302>

Johannes Schindelin schrieb:
> +# skip picking commits whose parents are unchanged
> +skip_unnecessary_picks () {
> +	fd=3
> +	while read command sha1 rest
> +	do
> +		# fd=3 means we skip the command
> +		case "$fd,$command,$(git rev-parse --verify --quiet $sha1^)" in
> +		3,pick,"$ONTO"*|t,p,"$ONTO"*)

s/t,/3,/

> +			# pick a commit whose parent is current $ONTO -> skip
> +			ONTO=$sha1
> +			;;
> +		3,#*|3,,*)
> +			# copy comments
> +			;;
> +		*)
> +			fd=1
> +			;;
> +		esac
> +		echo "$command${sha1:+ }$sha1${rest:+ }$rest" >&$fd
> +	done < "$TODO" > "$TODO.new" 3>> "$DONE" &&
> +	mv -f "$TODO".new "$TODO" ||
> +	die "Could not skip unnecessary pick commands"
> +}

-- Hannes

  reply	other threads:[~2009-03-03 11:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26 14:55 [RFH] rebase -i optimization Sverre Rabbelier
2009-02-26 14:59 ` Johannes Schindelin
2009-02-26 15:33   ` Sverre Rabbelier
2009-02-27 10:50     ` Johannes Schindelin
2009-02-27 12:29       ` Sverre Rabbelier
2009-02-27 12:56       ` [PATCH] rebase -i: avoid 'git reset' when possible Johannes Schindelin
2009-02-27 13:03         ` Sverre Rabbelier
2009-02-27 13:33           ` Johannes Schindelin
2009-03-01  8:38         ` Junio C Hamano
2009-03-01 21:57           ` Johannes Schindelin
2009-03-03  0:57             ` Junio C Hamano
2009-03-03  9:24               ` Johannes Schindelin
2009-03-03  9:55                 ` [PATCH v2] " Johannes Schindelin
2009-03-03 11:19                   ` Johannes Sixt [this message]
2009-03-03 11:21                     ` Johannes Schindelin
2009-02-27  1:10 ` [RFH] rebase -i optimization Sitaram Chamarty

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=49AD1250.4080708@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=s-beyer@gmx.net \
    --cc=spearce@spearce.org \
    --cc=srabbelier@gmail.com \
    --cc=stephen@exigencecorp.com \
    --cc=trast@student.ethz.ch \
    /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).