Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
edit documentation
  • Loading branch information
SandrineP committed Jun 12, 2026
commit 70a9065379f9beeb247a3cf4e95b87b573b09dcd
5 changes: 1 addition & 4 deletions src/subcommand/checkout_subcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ checkout_subcommand::checkout_subcommand(const libgit2_object&, CLI::App& app)
{
auto* sub = app.add_subcommand("checkout", "Switch branches or restore working tree files");

// "-- file" lands in m_positional_args because CLI11 consumes "--" silently.
sub->add_option("<tree-ish|pathspec>", m_positional_args, "Tree-ish to checkout, and/or one/many pathspec(s)");
// checkout <branch>, checkout <tag>, checkout <file> ..., checkout <branch> <file> ...
// Use without "--"
sub->add_option("<tree-ish|pathspec>", m_positional_args, "Tree-ish to checkout, and/or one/many pathspec(s)\ne.g. checkout <branch>, checkout <tag>, checkout <file> ..., checkout <branch> <file> ...\nNote: use without '--'");
sub->add_flag("-b", m_create_flag, "Create a new branch before checking it out");
sub->add_flag("-B", m_force_create_flag, "Create a new branch or reset it if it exists before checking it out");
sub->add_flag(
Expand Down