Merge branch 'db/push-cleanup'

* db/push-cleanup:
  Move push matching and reporting logic into transport.c
  Use a common function to get the pretty name of refs

Conflicts:
	transport.c
This commit is contained in:
Junio C Hamano
2009-03-26 00:28:46 -07:00
7 changed files with 356 additions and 107 deletions

10
refs.c
View File

@ -737,6 +737,16 @@ int check_ref_format(const char *ref)
}
}
const char *prettify_ref(const struct ref *ref)
{
const char *name = ref->name;
return name + (
!prefixcmp(name, "refs/heads/") ? 11 :
!prefixcmp(name, "refs/tags/") ? 10 :
!prefixcmp(name, "refs/remotes/") ? 13 :
0);
}
const char *ref_rev_parse_rules[] = {
"%.*s",
"refs/%.*s",