mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-21 17:21:13 +00:00
move_mrs: Disable our commit hook during the move
As GNU indent version can be different on the user system, we see some differences during migration thas causes conflicts. Making cherry-pick difficults to recover without breaking the style temporily. Note that cherry-pick continuation does not allow passing the -n option to skip the hooks. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1017>
This commit is contained in:
parent
3d25ff10a9
commit
f54c2a2bac
2 changed files with 11 additions and 0 deletions
|
@ -20,6 +20,12 @@ HOOKS="scripts/git-hooks/pre-commit.hook scripts/git-hooks/pre-commit-python.hoo
|
|||
# exit on error
|
||||
set -e
|
||||
|
||||
if [ "$GST_DISABLE_PRE_COMMIT_HOOKS" = "1" ]
|
||||
then
|
||||
echo "Pre-commits hooks disabled by env GST_DISABLE_PRE_COMMIT_HOOKS."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo $PWD
|
||||
|
||||
for hook in $HOOKS
|
||||
|
|
|
@ -334,6 +334,11 @@ class GstMRMover:
|
|||
self.gl = self.connect()
|
||||
self.gl.auth()
|
||||
|
||||
# Skip pre-commit hooks when migrating. Some users may have a
|
||||
# different version of gnu indent and that can lead to cherry-pick
|
||||
# failing.
|
||||
os.environ["GST_DISABLE_PRE_COMMIT_HOOKS"] = "1"
|
||||
|
||||
try:
|
||||
prevbranch = self.git(
|
||||
"rev-parse", "--abbrev-ref", "HEAD", can_fail=True).strip()
|
||||
|
|
Loading…
Reference in a new issue