l10n: git.pot: v2.11.0 round 2 (1 new, 1 removed)
[gitweb.git] / branch.c
index 1f1fbf528c638fc3a0dc9ae1b0f711870cd39af6..0d459b3cfe507b3906760fbea7f35e6191366057 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -228,8 +228,7 @@ N_("\n"
 "will track its remote counterpart, you may want to use\n"
 "\"git push -u\" to set the upstream config as you push.");
 
-void create_branch(const char *head,
-                  const char *name, const char *start_name,
+void create_branch(const char *name, const char *start_name,
                   int force, int reflog, int clobber_head,
                   int quiet, enum branch_track track)
 {
@@ -334,12 +333,12 @@ void remove_branch_state(void)
        unlink(git_path_squash_msg());
 }
 
-void die_if_checked_out(const char *branch)
+void die_if_checked_out(const char *branch, int ignore_current_worktree)
 {
        const struct worktree *wt;
 
        wt = find_shared_symref("HEAD", branch);
-       if (!wt)
+       if (!wt || (ignore_current_worktree && wt->is_current))
                return;
        skip_prefix(branch, "refs/heads/", &branch);
        die(_("'%s' is already checked out at '%s'"),