git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/7] git-rebase--interactive.sh: look up subject in add_pick_line
Date: Fri, 20 Jul 2012 10:14:20 +0200	[thread overview]
Message-ID: <5009135C.208@viscovery.net> (raw)
In-Reply-To: <1342596455-17046-5-git-send-email-martin.von.zweigbergk@gmail.com>

Am 7/18/2012 9:27, schrieb Martin von Zweigbergk:
> @@ -814,7 +814,8 @@ add_pick_line () {
>  	else
>  		comment_out=
>  	fi
> -	printf '%s\n' "${comment_out}pick $1 $2" >>"$todo"
> +	line=$(git rev-list -1 --pretty=oneline --abbrev-commit --abbrev=7 $1)
> +	printf '%s\n' "${comment_out}pick $line" >>"$todo"

I don't like this. On Windows, rebase -i is already slow, and these extra
processes will make it even slower.

> +	git rev-list $revisions --reverse --left-right --topo-order |
>  	sed -n "s/^>//p" |
> -	while read -r shortsha1 rest
> +	while read -r sha1
>  	do
> -		sha1=$(git rev-parse $shortsha1)
>  		if test -z "$rebase_root"
...
> -			add_pick_line $shortsha1 "$rest"
> +			add_pick_line $sha1
>  		fi

This is 'rebase -p' case, and you trade the new processes for some old ones.

> +	git rev-list $revisions --reverse --left-right --topo-order \
> +		--no-merges --cherry-pick |
>  	sed -n "s/^>//p" |
> -	while read -r shortsha1 rest
> +	while read -r sha1
>  	do
> -		add_pick_line $shortsha1 "$rest"
> +		add_pick_line $sha1
>  	done

But in the regulare case, you don't; the processes are really new.

Anything that can be done about this? Perhaps the rev-list call can
generate all of the full SHA1, the short SHA1, and the subject with a
--pretty format?

-- Hannes

  parent reply	other threads:[~2012-07-20  8:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18  7:27 [PATCH 0/7] correctly calculate patches to rebase Martin von Zweigbergk
2012-07-18  7:27 ` [PATCH 1/7] git-rebase--am.sh: avoid special-casing --keep-empty Martin von Zweigbergk
2012-07-18  7:27   ` [PATCH 2/7] git-rebase--interactive.sh: extract function for adding "pick" line Martin von Zweigbergk
2012-07-18  7:27     ` [PATCH 3/7] git-rebase--interactive: group all $preserve_merges code Martin von Zweigbergk
2012-07-18  7:27       ` [PATCH 4/7] git-rebase--interactive.sh: look up subject in add_pick_line Martin von Zweigbergk
2012-07-18  7:27         ` [PATCH 5/7] rebase -p: use --cherry-mark for todo file Martin von Zweigbergk
2012-07-18  7:27           ` [PATCH 6/7] rebase -p: don't request --left-right only to ignore left side Martin von Zweigbergk
2012-07-18  7:27             ` [PATCH 7/7] rebase (without -p): correctly calculate patches to rebase Martin von Zweigbergk
2012-07-20  8:18               ` Johannes Sixt
2012-07-20 15:58                 ` Martin von Zweigbergk
2012-07-20  8:14         ` Johannes Sixt [this message]
2012-07-20 15:47           ` [PATCH 4/7] git-rebase--interactive.sh: look up subject in add_pick_line Martin von Zweigbergk
2012-07-22 20:51             ` Junio C Hamano
2012-07-18 12:48     ` [PATCH 2/7] git-rebase--interactive.sh: extract function for adding "pick" line Neil Horman
2012-07-18  7:32 ` [PATCH 0/7] correctly calculate patches to rebase Martin von Zweigbergk

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=5009135C.208@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=martin.von.zweigbergk@gmail.com \
    /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).