Skip to content

Conversation

@jjerphan
Copy link
Member

@jjerphan jjerphan commented Dec 1, 2025

  • Implement remote add, remove, rename, set-url, show operations
  • Add fetch and push subcommands for remote synchronization
  • Create remote_wrapper class for RAII management
  • Add comprehensive test suite (19 tests, all passing)

Note that 6ef5d64 was generated.

- Implement remote add/remove/rename/set-url/show operations
- Add fetch and push subcommands for remote synchronization
- Create remote_wrapper class for RAII management
- Add comprehensive test suite (19 tests, all passing)
- Fix CMakeLists.txt to find CLI11 in conda/pixi environment

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
@jjerphan jjerphan marked this pull request as ready for review December 1, 2025 10:35
int sideband_progress(const char* str, int len, void*)
{
printf("remote: %.*s", len, str);
fflush(stdout);
Copy link
Member

Choose a reason for hiding this comment

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

Prefer C++ standard streams.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think the agent adopted some of the style of the codebase which uses printf:

ag printf                              
src/subcommand/clone_subcommand.cpp
21:        printf("remote: %.*s", len, str);

src/subcommand/merge_subcommand.cpp
173:            printf("Merge made\n");


if (git_oid_is_zero(a))
{
printf("[new] %.20s %s\n", b_str, refname);
Copy link
Member

Choose a reason for hiding this comment

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

Prefer C++ standard streams.

{
git_oid_fmt(a_str, a);
a_str[GIT_OID_SHA1_HEXSIZE] = '\0';
printf("[updated] %.10s..%.10s %s\n", a_str, b_str, refname);
Copy link
Member

Choose a reason for hiding this comment

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

Same here.


int fetch_progress(const git_indexer_progress* stats, void* payload)
{
static bool done = false;
Copy link
Member

Choose a reason for hiding this comment

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

Notice that this will prevent to use this function with many fetches . Since we're not going to implement it in this PR, I think it's fine for now, but you should add a note about it, stating this needs refactoring in order to be usable from mutiple fetches.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree. The agent must have taken some inspiration from those current uses.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
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