Skip to content

Commit

Permalink
fallback to HEAD^
Browse files Browse the repository at this point in the history
  • Loading branch information
doupache committed Nov 1, 2023
1 parent b1e44a5 commit 1ed7f74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ $(SPARK_SUBMIT_CMD):
.PHONY: lint
lint: $(GOLANGCI_LINT_BIN)
@echo "running golangci-lint"
@git symbolic-ref -q HEAD && REV="origin/HEAD" || REV="HEAD^" ; \
@git show-ref
@git symbolic-ref -q HEAD && REV="origin/HEAD"; \
git rev-parse $${REV} || REV="HEAD^"; \
headSHA=$$(git rev-parse --short=12 $${REV}) ; \
echo "checking against commit sha $${headSHA}" ; \
"${GOLANGCI_LINT_BIN}" run --new-from-rev=$${headSHA}
Expand Down

0 comments on commit 1ed7f74

Please sign in to comment.