added a lister for active branches called branchy
[feisty_meow.git] / scripts / rev_control / version_control.sh
index 80142d053debab14d300c517248e9ccfc4f08457..dcde45c6fcc6468eac2ef38cf1d4be1fa9c356ae 100644 (file)
@@ -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()