Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: [PATCH/RFC 06/10] Unify the lenght of $SHORT* and the commits in the TODO list

From: Jörg Sommer <hidden>
Date: 2016-06-15 22:44:28

Hi Junio,

Junio C Hamano schrieb am Fri 11. Apr, 17:00 (-0700):
Jörg Sommer [off-list ref] writes:
quoted
---
 git-rebase--interactive.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 1698c3e..060b40f 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -600,9 +600,9 @@ do
 			MERGES_OPTION=--no-merges
 		fi
 
-		SHORTUPSTREAM=$(git rev-parse --short $UPSTREAM)
-		SHORTHEAD=$(git rev-parse --short $HEAD)
-		SHORTONTO=$(git rev-parse --short $ONTO)
+		SHORTUPSTREAM=$(git rev-parse --short=7 $UPSTREAM)
+		SHORTHEAD=$(git rev-parse --short=7 $HEAD)
+		SHORTONTO=$(git rev-parse --short=7 $ONTO)
Lacking is a better justification as to why this is a good change
“This makes it easier to test for equality of a commit in the TODO list
and one of SHORTUPSTREAM, SHORTHEAD or SHORTONTO.”
and 7 is a good number.
I don't know why 7 is a good number. It was there from the beginning:

% git show 1b1dce4b:git-rebase--interactive.sh G -C1 \=7
                git rev-list --no-merges --pretty=oneline --abbrev-commit \
                        --abbrev=7 --reverse $UPSTREAM..$HEAD | \
                        sed "s/^/pick /" >> "$TODO"

Bye, Jörg.
-- 
Damit das Mögliche entsteht, muß immer wieder das Unmögliche versucht
werden.                                       (Hermann Hesse)

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help