aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2019-05-18 19:16:05 +0200
committerTeddy Wing2019-05-18 19:16:05 +0200
commit2262f986a2730a39a4c3c234152cd1db66e5c308 (patch)
treebfe9c13ab73c714a89c84d51388558251754742a
parentf6851df721aba099149d0555bf0333a28e0df211 (diff)
downloadcode-review-2262f986a2730a39a4c3c234152cd1db66e5c308.tar.bz2
Add directory diff command using `vdwrap`
Performs a dir diff opening all changed files in separate tabs in Vim all in diff mode. Currently it has some problems as `vdwrap` uses `/dev/null` to compare against new files, but Vim pops up errors saying `/dev/null` isn't a real file.
-rwxr-xr-xcode-review13
1 files changed, 13 insertions, 0 deletions
diff --git a/code-review b/code-review
new file mode 100755
index 0000000..df91825
--- /dev/null
+++ b/code-review
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+REVIEW_BASE=master..
+
+if [ $# -gt 1 ]; then
+ REVIEW_BASE="$1"
+fi
+
+git -c difftool.vdwrap.cmd='vdwrap $LOCAL $REMOTE' \
+ -c diff.tool=vdwrap \
+ difftool -t vdwrap --dir-diff "$REVIEW_BASE"
+
+# git diff --stat "$REVIEW_BASE"