Skip to content

Conversation

SandrineP
Copy link
Collaborator

@SandrineP SandrineP commented Jun 25, 2025

Add the branch information to the status subcommand when in long format (e.g. On branch main) and in short format when the branch flag is used (e.g. ## main).

p_resource=nullptr;
}

const char* reference_wrapper::get_ref_name(const repository_wrapper& rw)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should return a std::string rather than const char*. When the reference_wrapper goes out of scope at the end of this function, we can't be sure if the const char* returned from git_reference_shorthand is valid or not without checking the libgit2 code or documentation. If we return a string then we're taking a copy and this is guaranteed to work.

Copy link
Member

@ianthomas23 ianthomas23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SandrineP.

@ianthomas23 ianthomas23 merged commit fcd5972 into QuantStack:main Jun 26, 2025
1 check passed
@SandrineP SandrineP deleted the branch_wr branch June 26, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants