diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-11-07 16:22:07 +0100 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-11-07 16:22:07 +0100 |
commit | a341a7fafd1d39f02be34430852d2c0736ca5447 (patch) | |
tree | 8b07ea318e33e55c88e5524ef5e2c1bdd6e4fc3c /git-follow/git-follow.in | |
parent | 0cb782ade9552ed0e393e4baf7565661c3420edb (diff) | |
download | ndim-git-utils-a341a7fafd1d39f02be34430852d2c0736ca5447.tar.gz ndim-git-utils-a341a7fafd1d39f02be34430852d2c0736ca5447.tar.xz ndim-git-utils-a341a7fafd1d39f02be34430852d2c0736ca5447.zip |
Add new utilities: git-follow, git-buildmsg
Diffstat (limited to 'git-follow/git-follow.in')
-rw-r--r-- | git-follow/git-follow.in | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/git-follow/git-follow.in b/git-follow/git-follow.in new file mode 100644 index 0000000..7d8d4b6 --- /dev/null +++ b/git-follow/git-follow.in @@ -0,0 +1,44 @@ +#!/bin/sh + +unset CDPATH +SED="${SED-sed}" + +self=`basename "$0"` +selfdir=`dirname "$0"` +selfdir=`cd "$selfdir" && pwd` +. "$selfdir/git-ndim-sh" + +SUBDIRECTORY_OK="yes" +USAGE="<command> [params...]" + +LONG_USAGE="\ +Let a local subtree of branches follow a remote origin without too much merging. +For more details, see the ${self}(1) man page." +. git-sh-setup + +require_work_tree + +# Abort on error +set -e + +gf_init() { + git config follow.tree | while read from to restofline; do + if test "x#" = "x$(echo "$from" | sed -n '1s/^\(.\).*/\1/p')"; then continue; fi + echo "ITEM" + echo " From: $from" + echo " To: $to" + done +} + +# The great command case +command="$1" +if shift; then + case "$command" in *) + die "Invalid command line parameter: \"$command\"" + ;; + esac +else + die "Command required" +fi + +# End of file. |