[Pkg-ocaml-maint-commits] r5866 - /trunk/projects/git-guide/new-d-o-m-git-repo

zack at users.alioth.debian.org zack at users.alioth.debian.org
Sat Jul 19 20:16:24 UTC 2008


Author: zack
Date: Sat Jul 19 20:16:24 2008
New Revision: 5866

URL: http://svn.debian.org/wsvn/?sc=1&rev=5866
Log:
add the ability to create a git repo without injecting at the same time an upstream tarball (useful, e.g., when migrating from svn 2 git)

Modified:
    trunk/projects/git-guide/new-d-o-m-git-repo

Modified: trunk/projects/git-guide/new-d-o-m-git-repo
URL: http://svn.debian.org/wsvn/trunk/projects/git-guide/new-d-o-m-git-repo?rev=5866&op=diff
==============================================================================
--- trunk/projects/git-guide/new-d-o-m-git-repo (original)
+++ trunk/projects/git-guide/new-d-o-m-git-repo Sat Jul 19 20:16:24 2008
@@ -6,9 +6,14 @@
 
 PACKAGE="$1"
 TARBALL="$2"
-if [ -z "$PACKAGE" -o -z "$TARBALL" ] ; then
-  echo "Usage: new-d-o-m-git-repo PKGNAME TARBALL"
+if [ -z "$PACKAGE" ] ; then
+  echo "Usage: new-d-o-m-git-repo PKGNAME [ UPSTREAM_TARBALL ]"
   exit 1
+fi
+if [ -z "$TARBALL" ] ; then
+  INJECT_TARBALL="no"
+else
+  INJECT_TARBALL="yes"
 fi
 
 ALIOTH="alioth.debian.org"
@@ -37,18 +42,20 @@
 
 EOCMD
 
-echo "I: check in upstream tarball and setup branch layout"
-tmpdir=`mktemp -dt new-git-tmp.XXXXXXXXXX`
-trap "rm -rf $tmpdir" EXIT
-if [ "${TARBALL:0:1}" != "/" ] ; then
-  TARBALL="`pwd`/$TARBALL"
+if [ "$INJECT_TARBALL" = "yes" ] ; then
+  echo "I: check in upstream tarball and setup branch layout"
+  tmpdir=`mktemp -dt new-git-tmp.XXXXXXXXXX`
+  trap "rm -rf $tmpdir" EXIT
+  if [ "${TARBALL:0:1}" != "/" ] ; then
+    TARBALL="`pwd`/$TARBALL"
+  fi
+  (cd $tmpdir
+   git init
+   # see #475554
+   #git commit --allow-empty -m 'commit root'
+   #git branch upstream
+   git-import-orig --pristine-tar --no-dch "$TARBALL")
 fi
-(cd $tmpdir
- git init
- # see #475554
- #git commit --allow-empty -m 'commit root'
- #git branch upstream
- git-import-orig --pristine-tar --no-dch "$TARBALL")
 
 echo "I: pushing first changes to alioth.d.o"
 (cd $tmpdir




More information about the Pkg-ocaml-maint-commits mailing list