aboutsummaryrefslogtreecommitdiffstats
path: root/code-review-changed-files
diff options
context:
space:
mode:
Diffstat (limited to 'code-review-changed-files')
-rwxr-xr-xcode-review-changed-files10
1 files changed, 10 insertions, 0 deletions
diff --git a/code-review-changed-files b/code-review-changed-files
new file mode 100755
index 0000000..615111f
--- /dev/null
+++ b/code-review-changed-files
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+git diff --name-only "$@"
+
+# Use absolute path in case the PWD is not the Git root
+sed "s,/^,$(git rev-parse --show-toplevel),"
+$(git rev-parse --show-toplevel)
+awk '{ print "[CMD]" $0 }'
+
+git changed-files master.. | grep '_test\.go$' | awk -v git_root=$(git rev-parse --show-toplevel) '{ print git_root "/" $0 }'