path: root/refs.c
diff options
authorJunio C Hamano <>2009-03-08 08:12:33 (GMT)
committerJunio C Hamano <>2009-03-08 08:24:21 (GMT)
commit5ad6b0252b4fff02ac8516b2ea5e3e7330dcc76f (patch)
treeb230fb2d94d62b157fd5b2d5394d17578d8a8a8f /refs.c
parentabd2bde78bd994166900290434a2048e660dabed (diff)
parent8321c56b6bae25a2d70790f452df894be536b32c (diff)
Adjust js/remote-improvements and db/refspec-wildcard-in-the-middle
The latter topic changes the definition of how refspec's src and dst side is stored in-core; it used to be that the asterisk for pattern was omitted, but now it is included. The former topic handcrafts an old style refspec to feed the refspec matching machinery that lacks the asterisk and triggers an error. This resolves the semantic clash between the two topics early before they need to be merged to integration branches. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'refs.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index fef7c9f..8d3c502 100644
--- a/refs.c
+++ b/refs.c
@@ -1629,10 +1629,10 @@ int update_ref(const char *action, const char *refname,
return 0;
-struct ref *find_ref_by_name(struct ref *list, const char *name)
+struct ref *find_ref_by_name(const struct ref *list, const char *name)
for ( ; list; list = list->next)
if (!strcmp(list->name, name))
- return list;
+ return (struct ref *)list;
return NULL;