aboutsummaryrefslogtreecommitdiff
path: root/find-base-commits.sh
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2025-12-27 15:33:43 +0100
committerMirek Kratochvil <exa.exa@gmail.com>2025-12-27 15:33:43 +0100
commit346895a69bb6b3d724b9b7dcbf4dfb4098c4c587 (patch)
tree7389912a4816c38d59ac0d215ca2945301ccaaa4 /find-base-commits.sh
parent7683acc382b5499d718487ccfef6050436c17d4e (diff)
downloadgit-deli-346895a69bb6b3d724b9b7dcbf4dfb4098c4c587.tar.gz
git-deli-346895a69bb6b3d724b9b7dcbf4dfb4098c4c587.tar.bz2
organize
Diffstat (limited to 'find-base-commits.sh')
-rwxr-xr-xfind-base-commits.sh40
1 files changed, 0 insertions, 40 deletions
diff --git a/find-base-commits.sh b/find-base-commits.sh
deleted file mode 100755
index 3e16227..0000000
--- a/find-base-commits.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-extend_bases () {
- shas="$1"
- new="$2"
- for sha in $shas ; do
- [ "$sha" = "$new" ] && continue
- ${DELI_GIT_IS_ANCESTOR_CMD:-git merge-base --is-ancestor} "$sha" "$new"
- res=$?
- case $res in
- 0) ;;
- 1) echo "$sha" ;;
- *) echo "$0: ancestor finding failed" >&2
- exit 1 ;;
- esac
- done
- old=no
- for sha in $shas ; do
- [ "$sha" = "$new" ] && continue
- ${DELI_GIT_IS_ANCESTOR_CMD:-git merge-base --is-ancestor} "$new" "$sha"
- res=$?
- case $res in
- 0) old=yes ; break ;;
- 1) ;;
- *) echo "$0: ancestor finding failed" >&2
- exit 1 ;;
- esac
- done
- [ $old = no ] && echo "$new"
-}
-
-bases=""
-
-while read sha ; do
- bases=$( extend_bases "$bases" "$sha" )
-done
-
-for sha in $bases ; do
- echo "$sha"
-done