Re: git default behavior seems odd from a Unix command line point of view

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Junio -

Thanks for your reply giving historical context.  The command line
examples I gave were intended to give examples of the output rather
than my own usage pattern.

Here is my actual usage pattern... from a file called "sync.sh"
(would love feedback on whether this is the gitly? way to solve my use
case):

# environment set up occurs before loop, I pull before "pushing" in an
attempt to prevent
# conflicts from being left on the shared repository.
for dir in ./* ; do
    if [ ! -d $dir ]      ; then continue ; fi #not a directory
    if [ ! -e $dir/.git ] ; then continue ; fi #not a git repo
    dir=`basename $dir`
    echo "syncing: $dir"
    set +e # commit returns an error if there is nothing to commit.
    (cd ./$dir ; git commit -a)
    set -e
    (cd ./$dir ; git pull $UP "$REPO/$dir" master)        #pull
    ssh $HOST "mkdir -p $DEST_CACHE/$LOC/$dir"  # these three lines
handle "push"
    rsync -rl --delete ./$dir/.git -e ssh "$DEST:$DEST_CACHE/$LOC/$dir/.git"
    ssh $DEST "(cd $LOC/$dir ; /tools/bin/git pull
$DEST_CACHE/$LOC/$dir/.git master)"

done
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]