Skip to content

More consistent gh repo sync stdout #9499

@muzimuzhi

Description

@muzimuzhi

In gh v2.55.0 (2024-08-20), the stdout given by gh repo sync (manual page) are formed differently, when used to syncing remote fork from its parent and syncing local repository from remote parent.

$ cd /path/to/my/fork/of/cli

# sync remote fork from its parent
$ gh repo sync muzimuzhi/cli
✓ Synced the "muzimuzhi:trunk" branch from "cli:trunk"

# sync local from remote
gh repo sync
✓ Synced the "trunk" branch from cli/cli to local repository

The first observation is, in the output of gh repo sync, the name of repo (here cli/cli) is not double-quoted.

 ✓ Synced the "muzimuzhi:trunk" branch from "cli:trunk"
-✓ Synced the "trunk" branch from cli/cli to local repository
+✓ Synced the "trunk" branch from "cli/cli" to local repository

To make the two messages more aligned, the output of gh repo sync can be further reworded to be

 ✓ Synced the "muzimuzhi:trunk" branch from "cli:trunk"
-✓ Synced the "trunk" branch from cli/cli to local repository
+✓ Synced the "trunk" local branch from "cli/cli:trunk"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIfeedbackgh-reporelating to the gh repo commandhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions