Git development
 help / color / mirror / Atom feed
From: Domenico Andreoli <cavokz@gmail.com>
To: git@vger.kernel.org
Subject: git-log-branches
Date: Fri, 10 Aug 2007 09:53:49 +0200	[thread overview]
Message-ID: <20070810075349.GA29584@raptus.dandreoli.com> (raw)

Hi,

  in trying to survive in the forest of git repositories I spread all
over my boxes, I came to this script. I use it to see which changes
are in my local branches w.r.t. tracked remotes and vice versa.

It is pretty raw and uses only commands I know. Feel free to point me
to better command using. Or to a better script, which I am sure has
been already written ;)

cheers,
Domenico


#! /bin/sh

if [ -z "$1" ]; then
        echo "usage: $0 <remote>"
        exit
fi

for b in $(git branch | sed 's/^..//'); do
        if ! git branch -r | grep $1/$b >/dev/null; then
                continue
        fi

        if [ -n "$(git log $b..$1/$b)" ]; then
                echo "$b..$1/$b:"
                git log $b..$1/$b
        fi

        if [ -n "$(git log $1/$b..$b)" ]; then
                echo "$1/$b..$b:"
                git log $1/$b..$b
        fi
done


-----[ Domenico Andreoli, aka cavok
 --[ http://www.dandreoli.com/gpgkey.asc
   ---[ 3A0F 2F80 F79C 678A 8936  4FEE 0677 9033 A20E BC50

                 reply	other threads:[~2007-08-10  7:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070810075349.GA29584@raptus.dandreoli.com \
    --to=cavokz@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox