git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rebase -i: optimize the creation of the todo file
@ 2012-03-08 10:42 Dominique Quatravaux
  2012-03-08 10:42 ` [PATCH 2/2] rebase -i: new option --name-rev Dominique Quatravaux
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Dominique Quatravaux @ 2012-03-08 10:42 UTC (permalink / raw)
  To: gitster, git; +Cc: Dominique Quatravaux

Instead of obtaining short SHA1's from "git rev-list" and hitting the repository
once more with "git rev-parse" for the full-size SHA1's, obtain long SHA1's from
"git rev-list" and truncate them with "cut".
---
 git-rebase--interactive.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 5812222..8dcb8b0 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -774,17 +774,17 @@ else
 	revisions=$onto...$orig_head
 	shortrevisions=$shorthead
 fi
-git rev-list $merges_option --pretty=oneline --abbrev-commit \
-	--abbrev=7 --reverse --left-right --topo-order \
+git rev-list $merges_option --pretty=oneline --no-abbrev-commit \
+	--reverse --left-right --topo-order \
 	$revisions | \
 	sed -n "s/^>//p" |
-while read -r shortsha1 rest
+while read -r sha1 rest
 do
+	shortsha1=$(echo $sha1 | cut -c1-7)
 	if test t != "$preserve_merges"
 	then
 		printf '%s\n' "pick $shortsha1 $rest" >> "$todo"
 	else
-		sha1=$(git rev-parse $shortsha1)
 		if test -z "$rebase_root"
 		then
 			preserve=t
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-03-09  9:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08 10:42 [PATCH 1/2] rebase -i: optimize the creation of the todo file Dominique Quatravaux
2012-03-08 10:42 ` [PATCH 2/2] rebase -i: new option --name-rev Dominique Quatravaux
2012-03-08 10:56   ` Thomas Rast
2012-03-08 11:57     ` Dominique Quatravaux
2012-03-08 18:58       ` Junio C Hamano
2012-03-09  7:58         ` Dominique Quatravaux
2012-03-08 19:08     ` Junio C Hamano
2012-03-08 22:13       ` Junio C Hamano
2012-03-09  7:22         ` Johannes Sixt
2012-03-09  9:04           ` Dominique Quatravaux
2012-03-09  9:45             ` Junio C Hamano
2012-03-08 10:48 ` [PATCH 1/2] rebase -i: optimize the creation of the todo file Thomas Rast
2012-03-08 11:48   ` Dominique Quatravaux
2012-03-08 11:55     ` Thomas Rast
2012-03-08 11:20 ` Johannes Sixt
2012-03-08 11:36   ` Dominique Quatravaux
2012-03-08 11:41     ` Dominique Quatravaux
2012-03-08 11:51       ` Johannes Sixt

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).