summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-11-07 14:13:25 +0900
committerJunio C Hamano <gitster@pobox.com>2023-11-09 02:00:35 +0900
commitc59a7f23373ff5a432b058a72dcd394d730fb2f6 (patch)
tree8b8210834e0a9feb0f538b40e564561cf3d98b81
parent3a49405f0bfb8ab57ad83670faad8fb1afbc9cbe (diff)
downloadgit-c59a7f23373ff5a432b058a72dcd394d730fb2f6.tar.gz
retire unused scripts
-rwxr-xr-xAT196
-rwxr-xr-xCB13
-rwxr-xr-xDoKernelOrg177
-rwxr-xr-xcandidates47
-rwxr-xr-xcheck-topic-merges29
-rwxr-xr-xcycle-run129
6 files changed, 0 insertions, 591 deletions
diff --git a/AT b/AT
deleted file mode 100755
index e3acfd9213..0000000000
--- a/AT
+++ /dev/null
@@ -1,196 +0,0 @@
-#!/bin/sh
-
-log=Meta/AT.log
->>"$log"
-buildlog=Meta/AT.build-logs
-mkdir -p "$buildlog"
-t="/tmp/AT.$$"
-
-trap 'rm -f "$t.*"; exit' 0 1 2 3 15
-
-_x40="[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"
-_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
-
-log_prune () {
- cp "$log" "$log.bak"
-
- git for-each-ref --format='%(objectname)' 'refs/heads/*/*' |
- git rev-list --not ko/maint --not --stdin |
- while read commit
- do
- git rev-parse --verify "$commit^{tree}"
- done | sort -u >"$t.tree0"
- sed -ne "s/A \($_x40\) .*/\1/p" "$log" | sort -u >"$t.tree1"
- comm -13 "$t.tree0" "$t.tree1" | sed -e 's|.*|/^A &/d|' >"$t.prune"
-
- next=$(git rev-parse --verify "refs/heads/next^0")
- ko_next=$(git rev-parse --verify "refs/remotes/ko/next^0")
- echo "/^N /{
- s/^N $next /&/
- t ok
- s/^N $ko_next /&/
- t ok
- d
- : ok
-}" >>"$t.prune"
-
- sed -f "$t.prune" "$log" >"$t.pruned"
- cat "$t.pruned" >"$log"
-}
-
-check_skip_test () {
- GIT_SKIP_TESTS=
- git diff --name-only ko/master "$1" >"$t.d"
- if ! grep -q -e git-svn "$t.d"
- then
- GIT_SKIP_TESTS="$GIT_SKIP_TESTS t91??"
- fi
- if ! grep -q -e git-cvsexportcommit "$t.d"
- then
- GIT_SKIP_TESTS="$GIT_SKIP_TESTS t9200"
- fi
- if ! grep -q -e git-cvsimport "$t.d"
- then
- GIT_SKIP_TESTS="$GIT_SKIP_TESTS t9600"
- fi
- if test -n "$GIT_SKIP_TESTS"
- then
- export GIT_SKIP_TESTS
- else
- unset GIT_SKIP_TESTS
- fi
-}
-
-autotest () {
- commit=$(git rev-parse --verify "$1^0") &&
- tree=$(git rev-parse --verify "$commit^{tree}") || return 1
- grep -s "^A $tree " "$log" >/dev/null && return 0
- o="$buildlog/$tree"
-
- git reset -q --hard HEAD^0 &&
- git checkout -q "$commit^0" || return 1
-
- check_skip_test "$tree"
-
- PAGER= git show -s --pretty='format:* %h %s%n' "$commit" --
- if ! Meta/Make -pedantic >"$o" 2>&1
- then
- status="build error"
- elif ! Meta/Make -pedantic test >>"$o" 2>&1
- then
- status="test error"
- else
- status=ok
- rm -f "$o"
- fi
- : Meta/Make clean >/dev/null 2>&1
- echo "A $tree $status" >>"$log"
- echo "$status"
-}
-
-append_to_status () {
- if test -z "$status"
- then
- status="$1"
- else
- status="$status; $1"
- fi
-}
-
-nexttest () {
- mb=$(git merge-base "$commit" "$next") || return 1
- test "$mb" = "$commit" && return 0
- grep -s "^N $next $commit " "$log" >/dev/null && return 0
-
- branch="${refname#refs/heads/}"
- git reset -q --hard next^0
-
- echo "* $branch"
-
- status= skip_build=
- if ! git merge "$commit" >/dev/null 2>&1
- then
- conflict_count=$(git ls-files -u |
- sed -e 's/.* //' |
- sort -u |
- xargs grep -e '^<<<<<<< ' |
- wc -l)
- if test $conflict_count = 0
- then
- append_to_status "rerere ok"
- else
- skip_build=t
- append_to_status "conflict $conflict_count"
- fi
- fi
- if test -z "$skip_build"
- then
- o="$buildlog/$commit"
- check_skip_test "$commit"
- if ! Meta/Make -pedantic >"$o" 2>&1
- then
- append_to_status "build error"
- elif ! Meta/Make -pedantic test >>"$o" 2>&1
- then
- append_to_status "test error"
- else
- append_to_status "test ok"
- rm -f "$o"
- fi
- fi
- : Meta/Make clean >/dev/null 2>&1
- echo "N $next $commit $status" >>"$log"
- echo "$status"
-}
-
-loop () {
- Meta/Make clean >/dev/null 2>&1
- git reset --hard -q
- git checkout -q HEAD^0
- next=$(git rev-parse --verify "refs/remotes/ko/next^0")
-
- while :
- do
- log_prune
-
- date
-
- l0=$(ls -l "$log")
-
- git for-each-ref --format='%(objectname)' 'refs/heads/*/*' |
- git rev-list --not ko/maint ko/master --not --stdin |
- while read commit
- do
- autotest "$commit" || echo "oops?"
- done
-
- l1=$(ls -l "$log")
- test "$l0" = "$l1" || continue
-
- git for-each-ref --format='%(objectname) %(refname)' \
- 'refs/heads/*/*' |
- while read commit refname
- do
- nexttest "$commit" "$refname" || echo "oops?"
- done
-
- l1=$(ls -l "$log")
- test "$l0" = "$l1" || continue
-
- sleep 600 || exit
- done
-}
-
-case "$#" in
-0)
- loop
- exit ;;
-esac
-
-(
- git rev-list --no-walk "$@" 2>/dev/null || git rev-list "$@"
-) |
-while read commit
-do
- autotest "$commit"
-done
diff --git a/CB b/CB
deleted file mode 100755
index 685d96b973..0000000000
--- a/CB
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-# Cull topic branches
-
-git for-each-ref --merged maint 'refs/heads/*/*' |
-while read commit type name
-do
- git for-each-ref --count=1 --sort=version:refname \
- --contains "$name" \
- --format="%(taggerdate:iso) #%(refname:strip=2) $name" \
- refs/tags/
-done |
-sort |
-sed -e 's/[^#]*#//'
diff --git a/DoKernelOrg b/DoKernelOrg
deleted file mode 100755
index b31452a921..0000000000
--- a/DoKernelOrg
+++ /dev/null
@@ -1,177 +0,0 @@
-#!/bin/sh
-
-exec 3>&2 >./:all.log 2>&1
-
-ln_or_cp () {
- ln -f "$@" || cp -f "$@"
-}
-
-STAGE= narch= arch= master= jobs= rpm=t final= clean_stage=
-G=/pub/software/scm/git
-THIS=$(git describe HEAD)
-
-while case "$1" in -*) ;; *) break ;; esac
-do
- case "$1" in
- --master) master=t ;;
- --slave) master=f ;;
- -j*) jobs="$1" ;;
- --dist-only) rpm=f ;;
- --stage=?*) STAGE=${1#--stage=} ;;
- --clean-stage) clean_stage=t ;;
- --final) final=t ;;
- --pub=?*) G=${1#--pub=} ;;
- *) echo >&3 "Eh? $1"; exit 1 ;;
- esac
- shift
-done
-
-while test -n "$STAGE" && test "$STAGE" != "${STAGE%/}"
-do
- STAGE="${STAGE%/}"
-done
-
-if test -n "$clean_stage" && test -d "$STAGE/$G"
-then
- echo -n "Remove $STAGE/$G [y/N]? "
- read yesno
- case "$yesno" in
- [yY])
- rm -fr "$STAGE/$G" &&
- mkdir -p "$STAGE/$G" || exit ;;
- *)
- echo "Not removing, then"
- exit 0 ;;
- esac
-fi
-
-if test -z "$master"
-then
- case "$(hostname)" in
- hera.kernel.org) master=t ;;
- *) master=f ;;
- esac
-fi
-
-if test t = "$master"
-then
- narch='x86_64 i386 i686'
- if test -z "$final"
- then
- case "$STAGE" in
- ?*) final=f ;;
- '') final=t ;;
- esac
- fi
-else
- if test t != "$rpm"
- then
- echo >&3 "'--dist-only' only makes sense on the master machine"
- exit 1
- fi
- if test t = "$final"
- then
- echo >&3 "'--final' only makes sense on the master machine"
- exit 1
- fi
-fi
-
-eval $(rpm --showrc | sed -ne '
- s/^-14: dist[ ]*\./dist=/p
- s/^-11= _target_cpu[ ]*/arch=/p
-') && test -n "$dist" && test -n "$arch" || exit 1
-
-d='
-MAN_BASE_URL="http://www.kernel.org/pub/software/scm/git/docs/"
-ASCIIDOC_NO_ROFF=YesPlease
-ASCIIDOC8=YesPlease
-BLK_SHA1=YesPlease
-GNU_ROFF=YesPlease
-'
-
-rm -f version
-echo "* Building $THIS"
-
-make $jobs git &&
-V=`./git --version | sed -e 's/git version //'` || exit
-
-make $jobs dist || exit
-
-if test t = "$rpm"
-then
- NEEDS_CRYPTO_WITH_SSL=YesPlease make $jobs $d rpm || exit
-fi
-
-if test t != "$master"
-then
- (
- cd "$HOME/rpms/" &&
- tar cf "TARPIT/$V.$arch.$dist.tar" \
- RPMS/$arch/*-$V-*.$dist.$arch.rpm &&
- ls -ld $HOME/rpms/TARPIT/$V.$arch.$dist.tar
- ) || exit
- make clean
- echo >&2 "Done -- move RPMS to the master machine."
- echo >&2 "scp $HOME/rpms/TARPIT/$V.$arch.$dist.tar master.kernel.org:rpms/TARPIT"
- echo >&2 "sha1sum -c <<\EOF"
- (cd $HOME/rpms && sha1sum TARPIT/$V.$arch.$dist.tar) >&2
- echo >&2 "EOF"
- exit
-fi
-
-make $jobs $d dist-doc || exit
-
-mkdir -p "$STAGE$G" &&
-ln_or_cp git-$V.tar.gz "$STAGE$G/." &&
-ln_or_cp git-htmldocs-$V.tar.gz git-manpages-$V.tar.gz "$STAGE$G/." &&
-mkdir -p "$STAGE$G/docs/v$V" &&
-tar Cxf "$STAGE$G/docs/v$V" "$STAGE$G/git-htmldocs-$V.tar.gz" || exit
-
-case "$V" in
-*.rc[0-9]* | *-rc[0-9]*)
- mkdir -p "$STAGE$G/testing" || exit
- for a in $narch
- do
- for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
- do
- test -f "$rr" || continue
- ln_or_cp "$rr" "$STAGE$G/testing/." || exit
- done
- done
- ln_or_cp $HOME/rpms/SRPMS/git-$V-*.src.rpm "$STAGE$G/testing/." || exit
- ;;
-*)
- mkdir -p "$STAGE$G/RPMS/$arch" "$STAGE$G/RPMS/SRPMS" || exit
- for a in $narch
- do
- mkdir -p "$STAGE$G/RPMS/$a" || exit
- for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
- do
- test -f "$rr" || continue
- ln_or_cp "$rr" "$STAGE$G/RPMS/$a/." || exit
- done
- done
- ln_or_cp $HOME/rpms/SRPMS/git-$V-*.src.rpm "$STAGE$G/RPMS/SRPMS/." || exit
-esac
-
-make clean
-
-if test t = "$final"
-then
- if test -n "$STAGE"
- then
- (
- cd "$STAGE$G" &&
- find . ! -type d -print0 | cpio -0plumda "$G" ||
- find . ! -type d -print0 | cpio -0pumda "$G"
- )
- fi || exit
- if test -f /usr/local/bin/yummy
- then
- for a in $narch
- do
- /usr/local/bin/yummy "$G/RPMS/$a"
- done
- /usr/local/bin/yummy "$G/RPMS/SRPMS"
- fi
-fi
diff --git a/candidates b/candidates
deleted file mode 100755
index 449041aed8..0000000000
--- a/candidates
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/perl
-# Feed whats-cooking to this to find what to merge to 'master'
-
-sub merged {
- my ($topic, $base) = @_;
- my $fh;
- (open $fh, "-|", qw(git rev-list), "^$base", $topic)
- or die "$!";
- my $count = 0;
- while (<$fh>) {
- $count++;
- }
- (close $fh)
- or die "$! (after $count for $topic)";
- return $count;
-}
-
-my ($topic, $topic_date, $last);
-my (@candidate);
-
-while (<>) {
- if (/^\* ([a-z][a-z]\/[-a-zA-Z0-9_]+) \(([-0-9]{10})\) \d+ commit/) {
- $topic = $last = $1;
- $topic_date = $2;
- next;
- }
- if (defined $topic) {
- if (/^ \(merged to 'next' on ([-0-9]{10}) at/) {
- push @candidate, [$topic, $1, $topic_date, ""];
- next;
- }
- $topic = undef;
- $topic_date = undef;
- }
- if (defined $last && @candidate && $candidate[-1][0] eq $last) {
- if (/Will merge to 'master'/i) {
- $candidate[-1][3] = "*";
- }
- }
-}
-
-for $topic (sort { ($a->[1] cmp $b->[1]) || ($a->[2] cmp $b->[2]) } @candidate) {
- my $count = merged($topic->[0], 'master');
- if ($count) {
- print "$topic->[1] $topic->[2] ($count) $topic->[3]$topic->[0]\n";
- }
-}
diff --git a/check-topic-merges b/check-topic-merges
deleted file mode 100755
index b6d66b840d..0000000000
--- a/check-topic-merges
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# Run this script _after_ making a proposed merge into a copy of
-# the target branch (e.g. "master") to see if it contains unrelated
-# merging back from the upstream.
-#
-F=`git diff-tree -r --name-only HEAD^ HEAD`
-echo "The topic modifies these paths:"
-echo "$F" | sed -e 's/^/ /'
-
-_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
-_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
-git rev-list --parents master..HEAD^2 |
-sed -ne "/^$_x40 $_x40 $_x40/p" |
-while read merge first second
-do
- echo
- # First is the previous cvs topic tip, second is what was merged into
- # it. Does the merge have anything to do with adjust the topic to
- # updated upstream?
- git name-rev "$merge"
- out=`git diff-tree --stat "$merge^" "$merge" -- $F`
- case "$out" in
- '')
- echo "* Nothing to do with the topic" ;;
- *)
- echo "$out" ;;
- esac
-done
diff --git a/cycle-run b/cycle-run
deleted file mode 100755
index 456f5be11f..0000000000
--- a/cycle-run
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/sh
-
-: ${RANGE:=origin/master..origin/seen} ${J:=j32} ${OKNG:="(OK|NG)"}
-
-test_it () {
- type=$1 commit=$2 subject=$3
- log=".Cycle/log.$commit"
- rm -f "$log"
- git ls-files -x Meta -x .Cycle -o -z | xargs -r -0 rm -rf
-
- (
- echo "*** log for $subject ***" &&
- case "$type" in
- C)
- # Single parent commit on a topic
- Meta/Make -$J &&
- Meta/Make -$J -- SPARSE_FLAGS=-Wsparse-error sparse
- ;;
- M)
- # Merges on the first-parent chain on seen
- Meta/Make -$J -- SPARSE_FLAGS=-Wsparse-error sparse &&
- Meta/Make -$J -- test
- ;;
- T)
- # Commit at the tip of a topic
- Meta/Make -$J SANITIZE=address,undefined -- test &&
- Meta/Make -$J -- doc
- ;;
- esac
-
- status=$?
-
- # Does 'distclean' clean them up properly?
- Meta/Make -- $D distclean >/dev/null
- case $(git ls-files -x Meta -x .Cycle -o | wc -l) in
- 0) exit "$status" ;;
- *) git ls-files -x Meta -x .Cycle -o
- exit 1 ;;
- esac
- ) >"$log" 2>&1
- case $? in
- 0) rm -f "$log" ;;
- *) return 1 ;;
- esac
-}
-
-tested () {
- # sign=$1 commit=$2
- egrep "^$OKNG $1($2|$(git rev-parse "$2^{tree}"))" .Cycle/log >/dev/null
-}
-
-test_them () {
- while read merge parent sides
- do
- case "$parent" in
- ?*)
- tested M $merge && continue
- echo "TEST M $merge"
-
- for tip in $sides
- do
- git rev-parse --verify --quiet "$tip" || continue
- tested T $tip && continue
- echo "TEST $tip $merge"
- done
- ;;
- '')
- commit=$merge
- git rev-parse --verify --quiet "$commit" || continue
- tested C $commit && continue
- echo "TEST C $commit"
- esac
- done |
- sed -n -e 's/^TEST //p' >.Cycle/plan
-
- count=$(wc -l <.Cycle/plan)
- case $count in 0) return ;; esac
-
- total=$count
- echo TEST $count ON $(date) >>.Cycle/log
- while read tip merge
- do
- case "$tip" in
- M)
- type=M
- commit=$merge
- subject=$(git show -s --format="%s" "$commit") ;;
- C)
- type=C
- commit=$merge
- subject=$(git show -s --format="%s" "$commit") ;;
- *)
- type=T
- commit=$tip
- subject=$(
- git show -s --format="%s" "$merge" |
- sed -e 's/^Merge branch '\''\(.*\)'\'' into .*/\1/'
- ) ;;
- esac
-
- echo >&2 -n "$count/$total ?? $subject "
- if test_it $type $commit "$subject"
- then
- OK=OK
- else
- OK=NG
- fi
- echo "$OK $type$commit $count" >>.Cycle/log
- echo "$OK $type$(git rev-parse $commit^{tree}) $count" >>.Cycle/log
- echo >&2 "$count/$total $OK $subject"
- count=$(( $count - 1 ))
- done <.Cycle/plan
-}
-
-: >>.Cycle/log
-git reflog expire --expire=now --expire-unreachable=now --all
-git gc
-
-for l in .Cycle/log.[0-9a-f]*
-do
- x=${l##*.}
- git rev-parse --verify "$x" >/dev/null 2>&1 || rm -f "$l"
-done
-
-git fetch
-(
- git rev-list --no-merges $RANGE
- git rev-list --first-parent --parents $RANGE
-) | test_them