Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Support '}' characters in commit messages"

This reverts commit b7e4a41.
  • Loading branch information...
commit b66cd9b18937034790e326223485bbd84aaed150 1 parent d131a71
@garybernhardt authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 .githelpers
View
13 .githelpers
@@ -9,6 +9,9 @@
# author name, ensuring that we don't destroy anything in the commit message
# that looks like time.
#
+# The log format uses } characters between each field, and `column` is later
+# used to split on them. A } in the commit subject or any other field will
+# break this.
HASH="%C(yellow)%h%Creset"
RELATIVE_TIME="%Cgreen(%ar)%Creset"
@@ -16,11 +19,7 @@ AUTHOR="%C(bold blue)<%an>%Creset"
REFS="%C(red)%d%Creset"
SUBJECT="%s"
-colsep=$'\c_' # i.e. ^_ (ASCII Unit Separator)
- # colsep can be any single char that will never appear in the
- # commit subject or any other field.
-
-FORMAT="$HASH$colsep$RELATIVE_TIME$colsep$AUTHOR$colsep$REFS $SUBJECT"
+FORMAT="$HASH}$RELATIVE_TIME}$AUTHOR}$REFS $SUBJECT"
show_git_head() {
pretty_git_log -1
@@ -33,8 +32,8 @@ pretty_git_log() {
sed -Ee 's/(^[^<]*) ago\)/\1)/' |
# Replace (2 years, 5 months) with (2 years)
sed -Ee 's/(^[^<]*), [[:digit:]]+ .*months?\)/\1)/' |
- # Line columns up based on $colsep delimiter
- column -s "$colsep" -t |
+ # Line columns up based on } delimiter
+ column -s '}' -t |
# Page only if we need to
less -FXRS
}
Please sign in to comment.
Something went wrong with that request. Please try again.