git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Petr Baudis <pasky@suse.cz>
To: Petr Baudis <pasky@suse.cz>
Cc: Bert Wesarg <bert.wesarg@googlemail.com>,
	git@vger.kernel.org, martin f krafft <madduck@debian.org>,
	Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Subject: [TopGit PATCH] pre-commit: check .topdeps for valid branches
Date: Tue,  2 Jun 2009 23:09:22 +0200	[thread overview]
Message-ID: <1243976962-10486-1-git-send-email-bert.wesarg@googlemail.com> (raw)
In-Reply-To: <1243592316-10820-1-git-send-email-bert.wesarg@googlemail.com>

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>

---
 hooks/pre-commit.sh |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hooks/pre-commit.sh b/hooks/pre-commit.sh
index 8e05a4e..1eae2e8 100644
--- 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"
+
 		# deps can be non-tgish but we can't run recurse_deps() on them
 		ref_exists "refs/top-bases/$newly_added" ||
 			continue
-- 
tg: (0f8cd77..) bw/check-valid-deps (depends on: bw/check-for-dep-cycle)

       reply	other threads:[~2009-06-02 21:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1243592316-10820-1-git-send-email-bert.wesarg@googlemail.com>
2009-06-02 21:09 ` Bert Wesarg [this message]
2009-06-04  9:34   ` [TopGit PATCH] pre-commit: check .topdeps for valid branches Uwe Kleine-König
2009-06-04 12:18     ` Bert Wesarg
2010-10-04 21:07 [TopGit PATCH] hooks/pre-commit: check for cycles in dependencies Bert Wesarg
2010-10-04 21:18 ` [TopGit PATCH] pre-commit: check .topdeps for valid branches 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=1243976962-10486-1-git-send-email-bert.wesarg@googlemail.com \
    --to=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=madduck@debian.org \
    --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).