gitrefresh

Easily export, reinitialize and update all git repositories in a file hierarchy
git clone git://git.defalsify.org/gitrefresh.git
Info | Log | Files | Refs | README | LICENSE

test_list_add.sh (574B)


      1 . tests/test_list.sh
      2 
      3 bash ./gitrefresh.sh update $td
      4 
      5 >&2 echo have td=$td ts=$rs r=$r from source
      6 
      7 pushd $ts
      8 
      9 d="d"
     10 mkdir -v $d
     11 pushd $d
     12 git init
     13 uuidgen > data.txt
     14 git add data.txt
     15 git commit -m "initial commit"
     16 popd
     17 pushd $td
     18 repo="file://$ts/$d"
     19 echo $repo >> $r
     20 git clone $repo
     21 popd
     22 
     23 hl=$(mktemp)
     24 hr=$(mktemp)
     25 pushd a
     26 uuidgen > data.txt	
     27 git commit -a -m "more commit"
     28 git rev-parse HEAD >> $hl
     29 git rev-parse HEAD >> $hr
     30 popd
     31 
     32 popd
     33 
     34 vr=$(mktemp)
     35 vl=$(mktemp)
     36 sort $r > $vr
     37 
     38 bash ./gitlist.sh $td | sort > $vl
     39 diff $vr $vl
     40 
     41 bash ./gitrefresh.sh update $td
     42 diff $hl $hr