summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-08 08:12:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-03-08 08:24:21 (GMT)
commit5ad6b0252b4fff02ac8516b2ea5e3e7330dcc76f (patch)
treeb230fb2d94d62b157fd5b2d5394d17578d8a8a8f /refs.c
parentabd2bde78bd994166900290434a2048e660dabed (diff)
parent8321c56b6bae25a2d70790f452df894be536b32c (diff)
downloadgit-5ad6b0252b4fff02ac8516b2ea5e3e7330dcc76f.zip
git-5ad6b0252b4fff02ac8516b2ea5e3e7330dcc76f.tar.gz
git-5ad6b0252b4fff02ac8516b2ea5e3e7330dcc76f.tar.bz2
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 <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c4
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;
}