Compare commits
2
Commits
c83e407bfa
...
3fcc0c8211
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fcc0c8211 | ||
|
|
a5b3374fb2 |
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# gitflow post-commit — generated by gitflow_init. Do not hand-edit.
|
# gitflow post-commit — generated by gitflow_init. Do not hand-edit.
|
||||||
|
hook=post-commit
|
||||||
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
||||||
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
||||||
# Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests).
|
# Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests).
|
||||||
@@ -10,6 +11,6 @@ git remote get-url origin >/dev/null 2>&1 || exit 0
|
|||||||
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
||||||
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
||||||
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
||||||
echo "gitflow post-commit: push of '$br' FAILED — this commit exists only on this disk." >&2
|
echo "gitflow $hook: push of '$br' FAILED — this commit exists only on this disk." >&2
|
||||||
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# gitflow post-merge — generated by gitflow_init. Do not hand-edit.
|
# gitflow post-merge — generated by gitflow_init. Do not hand-edit.
|
||||||
|
hook=post-merge
|
||||||
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
||||||
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
||||||
# Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests).
|
# Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests).
|
||||||
@@ -10,6 +11,6 @@ git remote get-url origin >/dev/null 2>&1 || exit 0
|
|||||||
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
||||||
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
||||||
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
||||||
echo "gitflow post-commit: push of '$br' FAILED — this commit exists only on this disk." >&2
|
echo "gitflow $hook: push of '$br' FAILED — this commit exists only on this disk." >&2
|
||||||
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# gitflow post-commit — generated by gitflow_init. Do not hand-edit.
|
# gitflow post-commit — generated by gitflow_init. Do not hand-edit.
|
||||||
|
hook=post-commit
|
||||||
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
||||||
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
||||||
# Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests).
|
# Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests).
|
||||||
@@ -10,6 +11,6 @@ git remote get-url origin >/dev/null 2>&1 || exit 0
|
|||||||
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
||||||
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
||||||
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
||||||
echo "gitflow post-commit: push of '$br' FAILED — this commit exists only on this disk." >&2
|
echo "gitflow $hook: push of '$br' FAILED — this commit exists only on this disk." >&2
|
||||||
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# gitflow post-merge — generated by gitflow_init. Do not hand-edit.
|
# gitflow post-merge — generated by gitflow_init. Do not hand-edit.
|
||||||
|
hook=post-merge
|
||||||
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
||||||
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
||||||
# Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests).
|
# Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests).
|
||||||
@@ -10,6 +11,6 @@ git remote get-url origin >/dev/null 2>&1 || exit 0
|
|||||||
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
||||||
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
||||||
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
||||||
echo "gitflow post-commit: push of '$br' FAILED — this commit exists only on this disk." >&2
|
echo "gitflow $hook: push of '$br' FAILED — this commit exists only on this disk." >&2
|
||||||
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
+2
-2
@@ -425,7 +425,7 @@ HOOK
|
|||||||
# _gitflow_push_branch, inlined because the hook runs in arbitrary project
|
# _gitflow_push_branch, inlined because the hook runs in arbitrary project
|
||||||
# repos with no access to this lib.
|
# repos with no access to this lib.
|
||||||
_gitflow_emit_push_hook() {
|
_gitflow_emit_push_hook() {
|
||||||
printf '#!/bin/sh\n# gitflow %s — generated by gitflow_init. Do not hand-edit.\n' "$1"
|
printf '#!/bin/sh\n# gitflow %s — generated by gitflow_init. Do not hand-edit.\nhook=%s\n' "$1" "$1"
|
||||||
cat <<'HOOK'
|
cat <<'HOOK'
|
||||||
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
# Pushes every commit as it lands (BDR-095): a remote only backs up what it
|
||||||
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
# holds. Never fails the commit: no origin / offline / refused → warning only.
|
||||||
@@ -437,7 +437,7 @@ git remote get-url origin >/dev/null 2>&1 || exit 0
|
|||||||
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track
|
||||||
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi
|
||||||
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
if $t git push -q -u --follow-tags origin "$br" >/dev/null 2>&1; then exit 0; fi
|
||||||
echo "gitflow post-commit: push of '$br' FAILED — this commit exists only on this disk." >&2
|
echo "gitflow $hook: push of '$br' FAILED — this commit exists only on this disk." >&2
|
||||||
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
echo " Push by hand: git push -u origin $br (rejected as non-fast-forward? never force-push; ask first)" >&2
|
||||||
exit 0
|
exit 0
|
||||||
HOOK
|
HOOK
|
||||||
|
|||||||
Reference in New Issue
Block a user