PATH=$PATH:$(git --exec-path)
-quiet=
branch=
debug=
command=
fi
}
-say () {
- if test -z "$quiet"
- then
- printf "%s\n" "$*" >&2
- fi
-}
-
progress () {
- if test -z "$quiet"
+ if test -z "$GIT_QUIET"
then
printf "%s\r" "$*" >&2
fi
case "$opt" in
-q)
- quiet=1
+ GIT_QUIET=1
;;
-d)
debug=1
fi
debug "command: {$command}"
- debug "quiet: {$quiet}"
+ debug "quiet: {$GIT_QUIET}"
debug "revs: {$revs}"
debug "dir: {$dir}"
debug "opts: {$*}"
cmd_add_repository "$@"
else
- say "error: parameters were '$@'"
+ say >&2 "error: parameters were '$@'"
die "Provide either a commit or a repository and commit."
fi
}
fi
git reset "$commit" || exit $?
- say "Added dir '$dir'"
+ say >&2 "Added dir '$dir'"
}
cmd_split () {
fi
git update-ref -m 'subtree split' \
"refs/heads/$branch" "$latest_new" || exit $?
- say "$action branch '$branch'"
+ say >&2 "$action branch '$branch'"
fi
echo "$latest_new"
exit 0
sub=$2
if test "$sub" = "$rev"
then
- say "Subtree is already at commit $rev."
+ say >&2 "Subtree is already at commit $rev."
exit 0
fi
new=$(new_squash_commit "$old" "$sub" "$rev") || exit $?