From 9bfe4af5dbc5e1aee5cfa9a022c8f32b710552b3 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 21 Jun 2012 15:26:42 -0700 Subject: [PATCH 1/4] Added git-has(1) to check if a commit is present in the current branch --- bin/git-has | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 bin/git-has diff --git a/bin/git-has b/bin/git-has new file mode 100755 index 0000000..711bf5a --- /dev/null +++ b/bin/git-has @@ -0,0 +1,6 @@ +#!/bin/sh + +commit=$1 +test -z $commit && echo " required" 1>&2 && exit 1 +git branch --contains $commit | grep "*" > /dev/null && echo yes && exit +echo no && exit 1 From adcaf78418906d7d69d68965a536015fc1c0e5e3 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 21 Jun 2012 15:31:05 -0700 Subject: [PATCH 2/4] Revert "Added git-has(1) to check if a commit is present in the current branch" This reverts commit 9bfe4af5dbc5e1aee5cfa9a022c8f32b710552b3. --- bin/git-has | 6 ------ 1 file changed, 6 deletions(-) delete mode 100755 bin/git-has diff --git a/bin/git-has b/bin/git-has deleted file mode 100755 index 711bf5a..0000000 --- a/bin/git-has +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -commit=$1 -test -z $commit && echo " required" 1>&2 && exit 1 -git branch --contains $commit | grep "*" > /dev/null && echo yes && exit -echo no && exit 1 From 85c0b6dd8895f6aa7125171b687f0659daaf53d7 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Fri, 22 Jun 2012 09:07:03 -0700 Subject: [PATCH 3/4] Added git-delete-merged-branches(1) --- bin/git-delete-merged-branches | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 bin/git-delete-merged-branches diff --git a/bin/git-delete-merged-branches b/bin/git-delete-merged-branches new file mode 100755 index 0000000..a650469 --- /dev/null +++ b/bin/git-delete-merged-branches @@ -0,0 +1,2 @@ +#!/bin/sh +git branch --merged | grep -v "*" | xargs git delete-branch From 38e41cf6800c6bf0248608b5d48ff01a144493ff Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Fri, 22 Jun 2012 10:21:36 -0700 Subject: [PATCH 4/4] move active above commits in git-summary --- bin/git-summary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-summary b/bin/git-summary index bfc08fc..6a29842 100755 --- a/bin/git-summary +++ b/bin/git-summary @@ -67,8 +67,8 @@ repository_age() { echo echo " project : $project" echo " repo age :" $(repository_age) -echo " commits :" $(commit_count) echo " active :" $(active_days) days +echo " commits :" $(commit_count) if test "$commit" = ""; then echo " files :" $(file_count) fi