Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle clonefork errors more gracefully #21

Open
Cali0707 opened this issue Jul 15, 2023 · 0 comments · May be fixed by #24
Open

Handle clonefork errors more gracefully #21

Cali0707 opened this issue Jul 15, 2023 · 0 comments · May be fixed by #24
Assignees
Labels
command/clonefork This affects the git clonefork command enhancement New feature or request

Comments

@Cali0707
Copy link
Owner

Cali0707 commented Jul 15, 2023

Currently, running git clonefork without any URL can cause a lot of confusing errors (see below). We should suppress these errors and provide a more clear error message to users.

~/Leo: git clonefork                                                      
curl: (2) no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
fatal: You must specify a repository to clone.

usage: git clone [<options>] [--] <repo> [<dir>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --progress            force progress reporting
    --reject-shallow      don't clone shallow repository
    -n, --no-checkout     don't create a checkout
    --bare                create a bare repository
    --mirror              create a mirror repository (implies bare)
    -l, --local           to clone from a local repository
    --no-hardlinks        don't use local hardlinks, always copy
    -s, --shared          setup as shared repository
    --recurse-submodules[=<pathspec>]
                          initialize submodules in the clone
    --recursive ...       alias of --recurse-submodules
    -j, --jobs <n>        number of submodules cloned in parallel
    --template <template-directory>
                          directory from which templates will be used
    --reference <repo>    reference repository
    --reference-if-able <repo>
                          reference repository
    --dissociate          use --reference only while cloning
    -o, --origin <name>   use <name> instead of 'origin' to track upstream
    -b, --branch <branch>
                          checkout <branch> instead of the remote's HEAD
    -u, --upload-pack <path>
                          path to git-upload-pack on the remote
    --depth <depth>       create a shallow clone of that depth
    --shallow-since <time>
                          create a shallow clone since a specific time
    --shallow-exclude <revision>
                          deepen history of shallow clone, excluding rev
    --single-branch       clone only one branch, HEAD or --branch
    --no-tags             don't clone any tags, and make later fetches not to follow them
    --shallow-submodules  any cloned submodules will be shallow
    --separate-git-dir <gitdir>
                          separate git dir from working tree
    -c, --config <key=value>
                          set config inside the new repository
    --server-option <server-specific>
                          option to transmit
    -4, --ipv4            use IPv4 addresses only
    -6, --ipv6            use IPv6 addresses only
    --filter <args>       object filtering
    --also-filter-submodules
                          apply partial clone filters to submodules
    --remote-submodules   any cloned submodules will use their remote-tracking branch
    --sparse              initialize sparse-checkout file to include only files at root

usage: git remote add [<options>] <name> <url>

    -f, --fetch           fetch the remote branches
    --tags                import all tags and associated objects when fetching
                          or do not fetch any tag at all (--no-tags)
    -t, --track <branch>  branch(es) to track
    -m, --master <branch>
                          master branch
    --mirror[=(push|fetch)]
                          set up remote as a mirror to push to or fetch from

error: No such remote 'upstream'

Do you want to mute this error log and we have our own error log? The current log might cause some confusion to the user. What do you think @Cali0707

Originally posted by @Leo6Leo in #13 (comment)

@Cali0707 Cali0707 added the enhancement New feature or request label Jul 15, 2023
@Cali0707 Cali0707 self-assigned this Jul 16, 2023
@Cali0707 Cali0707 linked a pull request Jul 16, 2023 that will close this issue
2 tasks
@Cali0707 Cali0707 added the command/clonefork This affects the git clonefork command label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command/clonefork This affects the git clonefork command enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant