X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=blobdiff_plain;f=scripts%2Frev_control%2Fversion_control.sh;h=dcde45c6fcc6468eac2ef38cf1d4be1fa9c356ae;hp=80142d053debab14d300c517248e9ccfc4f08457;hb=353cffdc8318756f44b3d44064bf8b28d6905503;hpb=2f10609a685f0512cee89890d2e365a8f10c8054 diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 80142d05..dcde45c6 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -280,6 +280,23 @@ function check_branch_state() return $to_return } +# showes the branch currently active in the repository. +function show_active_branch() +{ +#hmmm: if no args, assume current dir! + + for directory in "$@"; do + echo -n "active branch for '$directory': " + pushd "$directory" &>/dev/null + +#hmmm: if git... + git rev-parse --abbrev-ref HEAD +#hmmm: else OTHERS!!! + + popd &>/dev/null + done +} + # only shows the branch state if it's not okay. # note that this is not the same as a conditional branch (ha ha). function show_branch_conditionally()