aboutsummaryrefslogtreecommitdiffhomepage
path: root/build_tools
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-04-07 13:47:51 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-04-07 13:47:51 -0700
commit784b438d4a686d6ca317d83133c6827ff23f4453 (patch)
tree7f68eb54e86a97a5e25a925099c5db4e387e60cd /build_tools
parentd2ae00ca44b7ae185835d0e71de244da29f16547 (diff)
fix git command in lint.fish script
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/lint.fish4
1 files changed, 2 insertions, 2 deletions
diff --git a/build_tools/lint.fish b/build_tools/lint.fish
index ef66d207..7182322f 100755
--- a/build_tools/lint.fish
+++ b/build_tools/lint.fish
@@ -35,14 +35,14 @@ else
# We haven't been asked to lint all the source. If there are uncommitted
# changes lint those, else lint the files in the most recent commit.
set pending (git status --porcelain --short --untracked-files=all | sed -e 's/^ *//')
- if count $pending > /dev/null
+ if set -q pending[1]
# There are pending changes so lint those files.
for arg in $pending
set files $files (string split -m 1 ' ' $arg)[2]
end
else
# No pending changes so lint the files in the most recent commit.
- set files (git show --porcelain --name-only --pretty=oneline head | tail --lines=+2)
+ set files (git show --word-diff=porcelain --name-only --pretty=oneline head)[2..-1]
end
# Extract just the C/C++ files.