Merge branch 'lm/git-blame-el' into maint
[gitweb.git] / builtin / checkout.c
index e8c1b1f189f077529ef2a79accb46ef21a9b8fe7..e060efb2a281865afbc6e5ae23d3f0fe2351dab0 100644 (file)
@@ -605,7 +605,7 @@ static int add_pending_uninteresting_ref(const char *refname,
                                         const unsigned char *sha1,
                                         int flags, void *cb_data)
 {
-       add_pending_sha1(cb_data, refname, sha1, flags | UNINTERESTING);
+       add_pending_sha1(cb_data, refname, sha1, UNINTERESTING);
        return 0;
 }
 
@@ -915,6 +915,8 @@ static int switch_unborn_to_new_branch(struct checkout_opts *opts)
        int status;
        struct strbuf branch_ref = STRBUF_INIT;
 
+       if (!opts->new_branch)
+               die(_("You are on a branch yet to be born"));
        strbuf_addf(&branch_ref, "refs/heads/%s", opts->new_branch);
        status = create_symref("HEAD", branch_ref.buf, "checkout -b");
        strbuf_release(&branch_ref);