Git development
 help / color / mirror / Atom feed
* [PATCH] git-rebase--interactive.sh: add config option for custom
@ 2015-06-08  0:53 Michael Rappazzo
  2015-06-08 15:28 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Rappazzo @ 2015-06-08  0:53 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

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 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index dc3133f..cc79b81 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -977,7 +977,14 @@ 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)
+if test -z "$format"
+then
+   format="%s"
+fi
+# the 'rev-list .. | sed' requires %m to parse; the instruction requires %h to parse
+format="%m%h ${format}"
+git rev-list $merges_option --pretty="${format}" --reverse --left-right --topo-order \
 	$revisions ${restrict_revision+^$restrict_revision} | \
 	sed -n "s/^>//p" |
 while read -r sha1 rest

---
https://github.com/git/git/pull/146

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-08 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-08  0:53 [PATCH] git-rebase--interactive.sh: add config option for custom Michael Rappazzo
2015-06-08 15:28 ` Junio C Hamano
2015-06-08 16:01   ` Mike Rappazzo
2015-06-08 17:29     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox