{"thread":{"id":"9469","subject":"git-log-branches","startedAt":"2007-08-10T07:53:49Z","lastAt":"2007-08-10T07:53:49Z","messageCount":1,"participants":["Domenico Andreoli"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"50389","messageId":"20070810075349.GA29584@raptus.dandreoli.com","threadId":"9469","inReplyTo":null,"subject":"git-log-branches","fromName":"Domenico Andreoli","fromEmail":"cavokz@gmail.com","sentAt":"2007-08-10T07:53:49Z","receivedAt":"2007-08-10T07:53:49Z","isPatch":false,"sender":{"key":"cavokz@gmail.com","avatar":null},"body":"Hi,\n\n  in trying to survive in the forest of git repositories I spread all\nover my boxes, I came to this script. I use it to see which changes\nare in my local branches w.r.t. tracked remotes and vice versa.\n\nIt is pretty raw and uses only commands I know. Feel free to point me\nto better command using. Or to a better script, which I am sure has\nbeen already written ;)\n\ncheers,\nDomenico\n\n\n#! /bin/sh\n\nif [ -z \"$1\" ]; then\n        echo \"usage: $0 <remote>\"\n        exit\nfi\n\nfor b in $(git branch | sed 's/^..//'); do\n        if ! git branch -r | grep $1/$b >/dev/null; then\n                continue\n        fi\n\n        if [ -n \"$(git log $b..$1/$b)\" ]; then\n                echo \"$b..$1/$b:\"\n                git log $b..$1/$b\n        fi\n\n        if [ -n \"$(git log $1/$b..$b)\" ]; then\n                echo \"$1/$b..$b:\"\n                git log $1/$b..$b\n        fi\ndone\n\n\n-----[ Domenico Andreoli, aka cavok\n --[ http://www.dandreoli.com/gpgkey.asc\n   ---[ 3A0F 2F80 F79C 678A 8936  4FEE 0677 9033 A20E BC50\n"}]}