Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

hooks/pre-commit: check .topdeps for valid branches

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
  • Loading branch information...
commit eff4bedc3f3ae92d47f7d78b19509ce2bd60d4e8 1 parent b7fdc22
@bertwesarg bertwesarg authored Uwe Kleine-König committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 hooks/pre-commit.sh
View
6 hooks/pre-commit.sh
@@ -78,6 +78,9 @@ BEGIN { in_hunk = 0; }
/^[^@ +-]/ { in_hunk = 0; }
' |
while read newly_added; do
+ ref_exists "$newly_added" ||
+ die "Invalid branch as dependent: $newly_added"
+
# check for self as dep
[ "$head_" != "$newly_added" ] ||
die "Can't have myself as dep"
@@ -90,6 +93,3 @@ BEGIN { in_hunk = 0; }
# therefore no endless loop in the cycle-check
no_remotes=1 recurse_deps check_cycle_name "$newly_added"
done
-
-
-# TODO: Verify .topdeps for valid branch names
Please sign in to comment.
Something went wrong with that request. Please try again.