* [TopGit PATCH] pre-commit: check .topdeps for valid branches
[not found] <1243592316-10820-1-git-send-email-bert.wesarg@googlemail.com>
@ 2009-06-02 21:09 ` Bert Wesarg
2009-06-04 9:34 ` Uwe Kleine-König
0 siblings, 1 reply; 4+ messages in thread
From: Bert Wesarg @ 2009-06-02 21:09 UTC (permalink / raw)
To: Petr Baudis, Petr Baudis
Cc: Bert Wesarg, git, martin f krafft, Uwe Kleine-Koenig
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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [TopGit PATCH] pre-commit: check .topdeps for valid branches
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
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2009-06-04 9:34 UTC (permalink / raw)
To: Bert Wesarg; +Cc: Petr Baudis, git, martin f krafft
Hi Bert,
> 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)
this patch doesn't apply to my branch. I'd say you didn't send out
bw/check-for-dep-cycle (or I oversaw it).
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [TopGit PATCH] pre-commit: check .topdeps for valid branches
2009-06-04 9:34 ` Uwe Kleine-König
@ 2009-06-04 12:18 ` Bert Wesarg
0 siblings, 0 replies; 4+ messages in thread
From: Bert Wesarg @ 2009-06-04 12:18 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Git Mailing List
2009/6/4 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> Hi Bert,
>
>> 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)
> this patch doesn't apply to my branch. I'd say you didn't send out
> bw/check-for-dep-cycle (or I oversaw it).
I have forwarded it to you, but you may also want to clone my topgit tree at:
http://kgb2.thruhere.net/git/?p=bertw/topgit.git;a=summary
Now that repo.or.cz is up again, I will put this repo on this server next week.
Regards,
Bert
>
> Best regards
> Uwe
^ permalink raw reply [flat|nested] 4+ messages in thread
* [TopGit PATCH] pre-commit: check .topdeps for valid branches
2010-10-04 21:07 [TopGit PATCH] hooks/pre-commit: check for cycles in dependencies Bert Wesarg
@ 2010-10-04 21:18 ` Bert Wesarg
0 siblings, 0 replies; 4+ messages in thread
From: Bert Wesarg @ 2010-10-04 21:18 UTC (permalink / raw)
To: Uwe Kleine-Koenig; +Cc: git, pasky, martin f krafft, Bert Wesarg
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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-04 21:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[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
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
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).