Johannes Sixt <j.sixt@viscovery.net> wrote:What's this obsession with whitespace in refnames? Twice in like two days people are talking about whitespace in refnames. WHITESPACE IS NOT PERMITTED IN REFNAMES. Do we need to apply the following patch, to keep people from creating refs by hand with whitespace in them? Is this really that common? git rev-parse HEAD >'.git/refs/heads/..i have spaces hah!' diff --git a/refs.c b/refs.c index aff02cd..b95bf83 100644 --- a/refs.c +++ b/refs.c @@ -246,6 +246,7 @@ static struct ref_list *get_ref_dir(const char *base, struct ref_list *list) struct stat st; int flag; int namelen; + int check; if (de->d_name[0] == '.') continue; @@ -261,6 +262,9 @@ static struct ref_list *get_ref_dir(const char *base, struct ref_list *list) list = get_ref_dir(ref, list); continue; } + check = check_ref_format(ref); + if (check != 0 && check != -2) + continue; if (!resolve_ref(ref, sha1, 1, &flag)) { error("%s points nowhere!", ref); continue; -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Re: O_DIRECT question |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Dave Airlie | Re: [2.6.25-rc6] possible regression: X server dying |
| Florian Schmidt | blacklist kernel boot option |
git: | |
| Petr Baudis | repo.or.cz wishes? |
| Jon Smirl | ! [rejected] master -> master (non-fast forward) |
| Matthieu Moy | [BUG] git-svn dcommit fails (connection closed unexpectedly) |
| Jakub Narebski | Git User's Survey 2007 partial summary |
| Ondřej Surý | openbgp not exporing ipv6 to routing tables |
| Nick Guenther | Re: Real men don't attack straw men |
| Christophe Rioux | OpenBSD as host for VMWare Server |
| Bambero | two wan interfaces |
| Warner Losh | Re: SMP re-eetrancy in "bottom half" drivers |
| Martin Husemann | Re: Prototype kernel continuation-passing for NetBSD |
| Martin Husemann | Dynamic registry of ehternet frame types |
| der Mouse | Re: file id alignment |
