| 2983 | } |
| 2984 | |
| 2985 | static void NORETURN diagnose_missing_default(const char *def) |
| 2986 | { |
| 2987 | int flags; |
| 2988 | const char *refname; |
| 2989 | |
| 2990 | refname = refs_resolve_ref_unsafe(get_main_ref_store(the_repository), |
| 2991 | def, 0, NULL, &flags); |
| 2992 | if (!refname || !(flags & REF_ISSYMREF) || (flags & REF_ISBROKEN)) |
| 2993 | die(_("your current branch appears to be broken")); |
| 2994 | |
| 2995 | skip_prefix(refname, "refs/heads/", &refname); |
| 2996 | die(_("your current branch '%s' does not have any commits yet"), |
| 2997 | refname); |
| 2998 | } |
| 2999 | |
| 3000 | /* |
| 3001 | * Parse revision information, filling in the "rev_info" structure, |
no test coverage detected