Skip to content

Commit 5e86f16

Browse files
committed
Retain space after leading --- and +++, add TAB before (revision 0)
1 parent b8f4a11 commit 5e86f16

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-svn-diff

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
# - Remove EOL whitespaces.
2222
# - 2011-12-27 Incorporate fixes by https://github.com/nfloyd
2323
# from the Gist comment 2011-07-31 https://gist.github.com/946727
24+
#
25+
# <javabrett>
26+
# - Retain space after leading --- and +++, add TAB before (revision 0)
2427

2528
# Get the tracking branch (if we're on a branch)
2629

@@ -49,7 +52,7 @@ REV=$(git svn info |
4952
git diff \
5053
--no-prefix $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH) \
5154
"$@" |
52-
sed -e "/--- \/dev\/null/{ N; s|^--- /dev/null\n+++ \(.*\)|---\1(revision 0)\n+++\1(revision 0)|;}" \
55+
sed -e "/--- \/dev\/null/{ N; s|^--- /dev/null\n+++ \(.*\)|--- \1\t(revision 0)\n+++ \1\t(revision 0)|;}" \
5356
-e "s/^--- .*/& (revision $REV)/" \
5457
-e "s/^+++ .*/& (working copy)/" \
5558
-e "s/^diff --git [^[:space:]]*/Index:/" \

0 commit comments

Comments
 (0)