Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] git feedback

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Arwed von Merkatz <v.merkatz AT gmx.net>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] git feedback
  • Date: Fri, 28 Jul 2006 22:24:35 +0200

On Fri, Jul 28, 2006 at 10:14:49PM +0200, Arwed von Merkatz wrote:
> I'm attaching my git-update-branches script. It gets all branches
> existing on the remote and pulls them, setting up a Pull line for future
> updates. It's a very simple quick-hack, so don't expect it to be too
> smart, but it worked fine for me to update my clone after the new stable
> branches were created.

This time with an actual attachment ;)

--
Arwed v. Merkatz Source Mage GNU/Linux developer
http://www.sourcemage.org
#!/bin/sh

heads=$(git-ls-remote --heads origin | cut -f2)

local_heads=$(ls .git/refs/heads)

for refname in $heads; do
name=${refname/refs\/heads\/}
if [[ $name = master ]]; then continue; fi
if ! echo $local_heads | grep -q $name; then
git fetch origin $refname:$refname
echo "Pull: $refname:$refname" >> .git/remotes/origin
fi
done



Archive powered by MHonArc 2.6.24.

Top of Page