From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Cc: git@vger.kernel.org, pasky@suse.cz,
martin f krafft <madduck@madduck.net>,
Bert Wesarg <bert.wesarg@googlemail.com>
Subject: [TopGit PATCH] pre-commit: check .topdeps for valid branches
Date: Mon, 4 Oct 2010 23:18:50 +0200 [thread overview]
Message-ID: <1286227130-8306-1-git-send-email-bert.wesarg@googlemail.com> (raw)
In-Reply-To: <1286226447-3390-1-git-send-email-bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
hooks/pre-commit.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hooks/pre-commit.sh b/hooks/pre-commit.sh
index fd960a4..f6901e4 100644 hooks/pre-commit.sh
--- a/hooks/pre-commit.sh
+++ b/hooks/pre-commit.sh
@@ -52,6 +52,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"
@@ -64,6 +67,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
--
tg: (d4c1eaf..) bw/check-valid-deps (depends on: bw/check-for-dep-cycle)
next prev parent reply other threads:[~2010-10-04 21:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 21:07 [TopGit PATCH] hooks/pre-commit: check for cycles in dependencies Bert Wesarg
2010-10-04 21:18 ` Bert Wesarg [this message]
2010-10-04 21:22 ` [TopGit PATCH] hooks/pre-commit: check for deps repititions Bert Wesarg
[not found] <1243592316-10820-1-git-send-email-bert.wesarg@googlemail.com>
2009-06-02 21:09 ` [TopGit PATCH] pre-commit: check .topdeps for valid branches Bert Wesarg
2009-06-04 9:34 ` Uwe Kleine-König
2009-06-04 12:18 ` Bert Wesarg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286227130-8306-1-git-send-email-bert.wesarg@googlemail.com \
--to=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=madduck@madduck.net \
--cc=pasky@suse.cz \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).