Nguyễn Thái Ngọc Duy writes:
> + if (opts.patch_mode || opts.pathspec)
> + return cmd_checkout_entry(&opts, &new);
> + else
> + return cmd_switch(&opts, &new);
> }
Yeah, patch_mode is really part of checking out paths, so separating
the actions into two makes se
Nguyễn Thái Ngọc Duy writes:
> I'm not entirely sure about this chunk
>
> +if (opts->track != BRANCH_TRACK_UNSPECIFIED) {
> +if (opts->new_orphan_branch)
> +die(_("%s cannot be used with %s"), "--orphan", "-t");
> +if (opts->force_detach)
> +
checkout operates in three different modes. On top of that it tries to
be smart by guessing the branch name for switching. This results in
messy option handling code. This patch reorders it so that
- cmd_checkout() is responsible for parsing, preparing input and
determinining mode
- Code of
3 matches
Mail list logo