l10n: de.po: improve message when switching branches
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index dc761599fde96cbf4ddd88608ffc13bce4bf0040..84b9070b8dca5eb94fbe9b7d7c463a0ea2af92eb 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -1741,9 +1741,8 @@ static enum peel_status peel_object(const unsigned char *name, unsigned char *sh
 
        if (o->type == OBJ_NONE) {
                int type = sha1_object_info(name, NULL);
-               if (type < 0)
+               if (type < 0 || !object_as_type(o, type, 0))
                        return PEEL_INVALID;
-               o->type = type;
        }
 
        if (o->type != OBJ_TAG)
@@ -3074,7 +3073,7 @@ static int log_ref_write(const char *refname, const unsigned char *old_sha1,
        return 0;
 }
 
-static int is_branch(const char *refname)
+int is_branch(const char *refname)
 {
        return !strcmp(refname, "HEAD") || starts_with(refname, "refs/heads/");
 }