Hi Richard,

Thanks for the new version,

On Wed, May 07, 2008 at 15:52:04 +0200, Richard Pöttler wrote:
> Hi,
> 
> thanks for your input. I have modified the driver according to your replies (I
> hope I understood them all). The actual version is attached. Are there any
> further suggestions/recommendations/comments?

I've attached to a patch which does the following:
- make it harder for the user to make local commits, and thus make clear
  the this is not intended (via custom GIT_DIR)
- avoid error if git config --get is empty
- remove unused OLDPWD

Cheers, Johannes
-- 
Johannes Winkelmann              mailto:[EMAIL PROTECTED]
Zurich, Switzerland              http://jw.smts.ch
--- git.orig    2008-05-07 15:54:28.000000000 +0200
+++ git 2008-05-07 16:09:12.000000000 +0200
@@ -7,16 +7,16 @@
 # BRANCH:      The branch of the repository to use
 # DESTINATION: The destination directory for the checked out repository
 
-OLDPWD=$PWD
 export PAGER=cat
+export GIT_DIR=.gitports
 
 # checks whether we got a valid repository (exit code will be 0, if the
 # repository is valid, otherwise 1)
 function checkValidRepository() {
-       if [ -d $DESTINATION/.git ]
+       if [ -d $DESTINATION/$GIT_DIR ]
        then
                cd $DESTINATION
-               if [ "$URL" ==  `git config --get remote.origin.url` ]
+               if [ "$URL" ==  "`git config --get remote.origin.url`" ]
                then
                        return 0
                fi
@@ -63,6 +63,4 @@
 
 git-checkout -q $BRANCH
 
-cd $OLDPWD
-
 echo "Finished successfully"
_______________________________________________
crux-devel mailing list
crux-devel@lists.crux.nu
http://lists.crux.nu/mailman/listinfo/crux-devel

Reply via email to