[PATCH] rebase -i: respect to core.abbrev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



git rebase -i collapses ids on todo list to 7 hexdigits.
Let's use core.abbrev config option instead, if it's set.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
---
 git-rebase--interactive.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 10bf318d0d..078c28ff1b 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -713,7 +713,8 @@ expand_todo_ids() {
 }
 
 collapse_todo_ids() {
-	transform_todo_ids --short=7
+	abbrev="$(git config --get 'core.abbrev')"
+	transform_todo_ids --short="${abbrev:-7}"
 }
 
 # Rearrange the todo list that has both "pick sha1 msg" and
-- 
1.8.4.rc3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]