aboutsummaryrefslogtreecommitdiffstats
path: root/git-changed-files
diff options
context:
space:
mode:
Diffstat (limited to 'git-changed-files')
-rwxr-xr-xgit-changed-files7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-changed-files b/git-changed-files
index 30a9c5c..615111f 100755
--- a/git-changed-files
+++ b/git-changed-files
@@ -1,3 +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 }'