[sysadmin-bin: 129/168] Fix problem when old revision and new revision have no common ancestor
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin: 129/168] Fix problem when old revision and new revision have no common ancestor
- Date: Thu, 24 May 2012 20:02:17 +0000 (UTC)
commit 0cee9981d264bf529d6962e54ed4f1bff9dd9f57
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Jan 6 17:53:05 2010 -0500
Fix problem when old revision and new revision have no common ancestor
There was missing quoting in the check for a non-fast-forward update
in the case where there was no common ancestor at all and
git merge-base fails and has empty output.
pre-receive-check-policy | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pre-receive-check-policy b/pre-receive-check-policy
index 0e9fadd..aa6944a 100755
--- a/pre-receive-check-policy
+++ b/pre-receive-check-policy
@@ -113,7 +113,7 @@ EOF
;;
update)
range="$oldrev..$newrev"
- if [ `git merge-base $oldrev $newrev` != $oldrev ] && ! forced ; then
+ if [ "`git merge-base $oldrev $newrev`" != $oldrev ] && ! forced ; then
# Non-fast-forward update. Right now we have
# receive.denyNonFastforwards in the git configs for
# our repositories anyways, but catching it here would
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]