[sysadmin-bin: 51/168] Add wrapper scripts for git-receive-pack for importing and forcing
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin: 51/168] Add wrapper scripts for git-receive-pack for importing and forcing
- Date: Thu, 24 May 2012 19:55:44 +0000 (UTC)
commit 18a1abc6fe9e74ee7d08e3fdc45827dca1b16a12
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Mar 19 17:26:50 2009 -0400
Add wrapper scripts for git-receive-pack for importing and forcing
Add git-receive-pack wrapper scripts that can be used (with some
symlinks and some changes to our overall ssh wrapper script) to
implement git push --exec=import and git push --exec=force variants
of git push. (They set the GNOME_GIT_FORCE and GNOME_GIT_IMPORT
environment variables respectively.)
receive-pack-force | 17 +++++++++++++++++
receive-pack-import | 4 ++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/receive-pack-force b/receive-pack-force
new file mode 100755
index 0000000..23f05ad
--- /dev/null
+++ b/receive-pack-force
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+in_gitadmin=false
+for g in `groups` ; do
+ if [ $g = 'gitadmin' -o $g = 'sysadmin' ] ; then
+ in_gitadmin=true
+ fi
+done
+
+if ! $in_gitadmin ; then
+ echo 1>&2 "You must be in the gitadmin group to force a push"
+ echo 1>&2 "Please contact contact gitmaster gnome org for assistance"
+ exit 1
+fi
+
+export GNOME_GIT_FORCE=1
+exec git-receive-pack $@
diff --git a/receive-pack-import b/receive-pack-import
new file mode 100755
index 0000000..6b0491c
--- /dev/null
+++ b/receive-pack-import
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+export GNOME_GIT_IMPORT=1
+exec git-receive-pack $@
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]