Template
13 lines
519 B
Bash
Executable File
13 lines
519 B
Bash
Executable File
#!/bin/sh
|
|
# Companion to scripts/pre-commit.
|
|
#
|
|
# `git commit -- <pathspec>` (also how some IDEs commit a file selection) builds
|
|
# the commit from a temporary index. The pre-commit bump therefore lands in the
|
|
# commit, but the real index keeps the pre-bump blob and plugin.json is left
|
|
# looking modified. The real index cannot be updated during the commit because
|
|
# git holds index.lock, so refresh it here instead.
|
|
#
|
|
# Must never fail a commit that already succeeded.
|
|
git add -- plugin.json 2>/dev/null || true
|
|
exit 0
|