]> git.droids-corp.org - git-central.git/commitdiff
Move to scripts--still a work in progress.
authorStephen Haberman <stephen@exigencecorp.com>
Thu, 21 Aug 2008 05:51:07 +0000 (00:51 -0500)
committerStephen Haberman <stephen@exigencecorp.com>
Thu, 21 Aug 2008 05:51:07 +0000 (00:51 -0500)
remerge.sh [deleted file]
scripts/remerge [new file with mode: 0644]

diff --git a/remerge.sh b/remerge.sh
deleted file mode 100644 (file)
index b328f92..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-git rev-list --first-parent "stable..HEAD" | while read commit ; do
-       number_of_parents=$(git rev-list -n 1 --parents $commit | sed 's/ /\n/g' | grep -v $commit | wc -l)
-       if [[ $number_of_parents > 1 ]] ; then
-               # For each parent
-               git rev-list --no-walk --parents $commit | sed 's/ /\n/g' | grep -v $commit | while read parent ; do
-                       echo "merge=$commit parent=$parent"
-                       # Does this parent have any children besides us?
-                       #
-                       # List the parents of all branch commits (after stable/parent), find
-                       # those that include our parent, get their sha1, remove our merge
-                       git rev-list --parents --branches ^stable "^$parent" | grep $parent | gawk '{print $1}' | grep -v $commit | while read child ; do
-                               echo "child $child"
-                               git rev-list "$child" "^$commit"
-                       done
-                       # Find any commits in the parent (and another branch) but not us--that means we need it
-                       # number_missing=$(git rev-list "$parent" --branches "^HEAD" | wc -l)
-                       # if [[ $number_missing > 0 ]] ; then
-                       #       git rev-list "$parent" --branches "^HEAD" | xargs git name-rev
-                       # fi
-               done
-       fi
-done
-
diff --git a/scripts/remerge b/scripts/remerge
new file mode 100644 (file)
index 0000000..99d868b
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+git rev-list --first-parent "origin/stable..HEAD" | while read commit ; do
+       number_of_parents=$(git rev-list -n 1 --parents $commit | sed 's/ /\n/g' | grep -v $commit | wc -l)
+       if [[ $number_of_parents > 1 ]] ; then
+               # For each parent
+               git rev-list --no-walk --parents $commit | sed 's/ /\n/g' | grep -v $commit | while read parent ; do
+                       echo "merge=$commit parent=$parent"
+                       # Does this parent have any children besides us?
+                       #
+                       # List the parents of all branch commits (after stable/parent), find
+                       # those that include our parent, get their sha1, remove our merge
+                       git rev-list --parents --branches ^stable "^$parent" | grep $parent | gawk '{print $1}' | grep -v $commit | while read child ; do
+                               echo "child $child"
+                               git rev-list "$child" "^$commit"
+                       done
+                       # Find any commits in the parent (and another branch) but not us--that means we need it
+                       # number_missing=$(git rev-list "$parent" --branches "^HEAD" | wc -l)
+                       # if [[ $number_missing > 0 ]] ; then
+                       #       git rev-list "$parent" --branches "^HEAD" | xargs git name-rev
+                       # fi
+               done
+       fi
+done
+