From eff4bedc3f3ae92d47f7d78b19509ce2bd60d4e8 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Mon, 4 Oct 2010 23:18:50 +0200 Subject: [PATCH] hooks/pre-commit: check .topdeps for valid branches MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Bert Wesarg Signed-off-by: Uwe Kleine-König --- hooks/pre-commit.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks/pre-commit.sh b/hooks/pre-commit.sh index b6361c5..6dbe82c 100644 --- a/hooks/pre-commit.sh +++ b/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 -- 2.11.4.GIT