From: Michael Rappazzo <rappazzo@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Michael Rappazzo <rappazzo@gmail.com>
Subject: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format
Date: Mon, 8 Jun 2015 17:00:02 -0400 [thread overview]
Message-ID: <1433797202-97425-2-git-send-email-rappazzo@gmail.com> (raw)
In-Reply-To: <1433797202-97425-1-git-send-email-rappazzo@gmail.com>
A config option 'rebase.instructionFormat' can override the
default 'oneline' format of the rebase instruction list.
Since the list is parsed using the left, right or boundary mark plus
the sha1, they are prepended to the instruction format.
Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
---
git-rebase--interactive.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index dc3133f..b92375e 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -977,7 +977,9 @@ else
revisions=$onto...$orig_head
shortrevisions=$shorthead
fi
-git rev-list $merges_option --pretty=oneline --reverse --left-right --topo-order \
+format=$(git config --get rebase.instructionFormat)
+# the 'rev-list .. | sed' requires %m to parse; the instruction requires %H to parse
+git rev-list $merges_option --format="%m%H ${format-%s}" --reverse --left-right --topo-order \
$revisions ${restrict_revision+^$restrict_revision} | \
sed -n "s/^>//p" |
while read -r sha1 rest
--
2.4.2
next prev parent reply other threads:[~2015-06-08 21:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 21:00 [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format Michael Rappazzo
2015-06-08 21:00 ` Michael Rappazzo [this message]
2015-06-08 21:29 ` Junio C Hamano
2015-06-09 9:36 ` Johannes Schindelin
2015-06-09 10:26 ` Mike Rappazzo
2015-06-09 19:23 ` Junio C Hamano
2015-06-09 19:38 ` Mike Rappazzo
2015-06-10 0:44 ` Junio C Hamano
2015-06-08 22:17 ` Junio C Hamano
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=1433797202-97425-2-git-send-email-rappazzo@gmail.com \
--to=rappazzo@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.