Changeset View
Changeset View
Standalone View
Standalone View
test/lint/git-subtree-check.sh
Show All 12 Lines | |||||
find_latest_squash() | find_latest_squash() | ||||
{ | { | ||||
dir="$1" | dir="$1" | ||||
sq= | sq= | ||||
main= | main= | ||||
sub= | sub= | ||||
git log --grep="^git-subtree-dir: $dir/*\$" \ | git log --grep="^git-subtree-dir: $dir/*\$" \ | ||||
--pretty=format:'START %H%n%s%n%n%b%nEND%n' "$COMMIT" | | --pretty=format:'START %H%n%s%n%n%b%nEND%n' "$COMMIT" | | ||||
while read a b junk; do | while read a b _; do | ||||
case "$a" in | case "$a" in | ||||
START) sq="$b" ;; | START) sq="$b" ;; | ||||
git-subtree-mainline:) main="$b" ;; | git-subtree-mainline:) main="$b" ;; | ||||
git-subtree-split:) sub="$b" ;; | git-subtree-split:) sub="$b" ;; | ||||
END) | END) | ||||
if [ -n "$sub" ]; then | if [ -n "$sub" ]; then | ||||
if [ -n "$main" ]; then | if [ -n "$main" ]; then | ||||
# a rejoin commit? | # a rejoin commit? | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |