From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Cc: Eric Sunshine <sunshine@sunshineco.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH] rebase -i: respect to core.abbrev
Date: Sat, 28 Sep 2013 19:07:15 +0300 [thread overview]
Message-ID: <1380384435-20846-1-git-send-email-kirill.shutemov@linux.intel.com> (raw)
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@linux.intel.com>
---
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
next reply other threads:[~2013-09-28 16:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-28 16:07 Kirill A. Shutemov [this message]
2013-09-28 21:10 ` [PATCH] rebase -i: respect to core.abbrev Kirill A. Shutemov
2013-09-29 2:49 ` Eric Sunshine
2013-09-30 21:36 ` Jonathan Nieder
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=1380384435-20846-1-git-send-email-kirill.shutemov@linux.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.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).