~emersion/hut#46: 
Add created repo as remote

in a local repo which already had a (codeberg.org) remote origin, I ran hut git create my-proj, and got Created repository my-proj. No new remote was added to my local repo, though - which is what I would have liked. Alternatively, the remote URL could be shown in the output, to add the remote manually.

Status
REPORTED
Submitter
~hoijui
Assigned to
No-one
Submitted
1 year, 30 days ago
Updated
1 year, 23 days ago
Labels
No labels applied.

~emersion 1 year, 29 days ago

That's the expected behavior. git create just creates the repository and does nothing else. Adding remotes by default sounds like a bad idea - maybe the user happens to be in a directory which has nothing to do with the new repository. Also, maybe the user wants to clone the repo instead of adding a remote.

~hoijui 1 year, 27 days ago*

true; The most common behavior though, would likely be, that the user would want a remote to be added. Could there be a flag (e.g. --add-as-remote) for that? and in either case, outputting the remote URL to stdout would be useful, no?

~emersion 1 year, 23 days ago

Both sound like good ideas.

~emersion 1 year, 23 days ago

Note, hut git create already has a --clone flag.