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

Re: [PATCH v2 04/13] Teach rebase interactive the mark command

From: Jörg Sommer <hidden>
Date: 2016-06-15 22:44:34
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Hi,

Johannes Schindelin schrieb am Sun 04. May, 10:38 (+0100):
	pick 1234567 Clean up rebase -i -p
	tag cleanup
	...
	merge 2345678 cleanup master

Yes, you read that correctly, I think that allowing plain ref names is 
very valuable.  AFAICT my original implementation allows that (dunno about 
the current code).
Your code is still used and you can do things like:

merge abc --strategy=YOUR_STRATEGY master 022ef38 my_tag

And I think it's really easy to do a git-describe for each ref that is not
marked of reset and merge commands

From fec670a4dc6fdf484a197687db5fbd0a4f668449 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?J=C3=B6rg=20Sommer?= <redacted>
Date: Sun, 4 May 2008 14:52:01 +0200
Subject: [PATCH] Use names instead of sha1 ID for reset and merge if possible
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Sometimes it's much more helpful to see the name of a branch or a tag as
the argument of a merge or reset command.

Signed-off-by: Jörg Sommer <redacted>
---
 git-rebase--interactive.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 2a01182..2bd858c 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -493,6 +493,10 @@ create_extended_todo_list () {
 			if tmp=$(get_value_from_list $args "$commit_mark_list")
 			then
 				args=":$tmp"
+			elif tmp=$(git describe --all --exact-match $args \
+				2>/dev/null)
+			then
+				args="$tmp"
 			fi
 			;;
 		merge)
@@ -503,6 +507,10 @@ create_extended_todo_list () {
 					"$commit_mark_list")
 				then
 					new_args="$new_args :$tmp"
+				elif tmp=$(git describe --all --exact-match \
+					$i 2>/dev/null)
+				then
+					new_args="$new_args $tmp"
 				else
 					new_args="$new_args $i"
 				fi
-- 
1.5.5.1

Bye, Jörg.
-- 
Diskutiere nie mit einem Idioten:
Sie ziehen Dich auf ihr Niveau herab und schlagen Dich dann mit
Erfahrung.

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