It would be useful to have a script to display current status of the
repository - branches, current branch and merge status. Maybe I'm
missing something, but I don't see such script.
I wrote a script that would do that. I'm still not fully familiar with
the concepts of cogito, so maybe wrong terms are used in the script. I
just want to offer this scripts as a base for further work.
cg-info sounds very pretentious, so maybe the script should be renamed
to cg-heads-ls or cg-admin-status or something like that.
Signed-off-by: Pavel Roskin <[EMAIL PROTECTED]>
# Show status of the GIT repository.
# Copyright (c) Pavel Roskin 2005
# The output includes the list of branches and merge status.
# Current branch is marked by ">"
mkdir -p $_git/refs/heads
[ "$(find $_git/refs/heads -follow -type f)" ] \
|| die "List of heads is empty."
if [ "$headlink" ]; then
echo "HEAD: $headsha1"
for head in $_git/refs/heads/*; do
if [ "$headbase" = "$branch" ]; then
echo ">$headbase $headsha1"
echo " $headbase $headsha1"
if [ -s "$_git/blocked" ]; then
echo "Blocked: $tmp"
if [ -s "$_git/merging" ]; then
echo "Merging: $tmp"
if [ -s "$_git/merging-sym" ]; then
echo "Merging-sym: $tmp"
if [ -s "$_git/merge-base" ]; then
echo "Merge-base: $tmp"
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html