CLFS stable and jhalfs

William Harrington kb0iic at berzerkula.org
Sat Sep 21 22:27:33 PDT 2013


> Hi,
>
> When asking for the "branch or stable version" 2.0.0 of CLFS, the first
> download is OK, but if the git working copy is already in the repository,
> "git pull" returns an error:
> --------------
> You are not currently on a branch. Please specify which
> branch you want to merge with. See git-pull(1) for details.
>
>     git pull <remote> <branch>
> --------------
>
> I do not know enough of git to be able to debug that.
> The command is in "common/libs/func_book_parser"
> maybe it would be enough to  change the initial 'git checkout $TREE'
> command
> to 'git checkout -b $TREE', but not sure...
>
> Regards
> Pierre
>

When using a branch which is already checked out, need to move to master,
pull, and then checkout the branch again

So on the first time downloaded, create the branch and checkout that branch
On every pull since then, move to the master branch, pull, then checkout
the branch. I think that is the correct way to do it:

Index: func_book_parser
===================================================================
--- func_book_parser	(revision 3725)
+++ func_book_parser	(working copy)
@@ -31,12 +31,17 @@
         if [ ! $TREE == "development" ]; then
            cd ${PROGNAME}-$LFSVRS
            echo "Checking out $LFSVRS at $PWD in $TREE"
-           git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
+           git checkout -b ${TREE} ${TREE} >>$LOGDIR/$LOG 2>&1
         fi
     else
       cd ${PROGNAME}-$LFSVRS
       case $PROGNAME in
-        clfs*)  git pull >>$LOGDIR/$LOG 2>&1 ;;
+        clfs*)  git checkout master >> $LOGDIR/$LOG 2>&1
+                git pull >>$LOGDIR/$LOG 2>&1
+                if [ ! ${TREE} == "development" ]; then
+                   git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
+                fi
+        ;;
         lfs | hlfs) svn up >>$LOGDIR/$LOG 2>&1 ;;
         *) ;;
       esac

Sincerely,

William Harrington




More information about the alfs-discuss mailing list