GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — enhancement: git push command in `doInitialCommit` function by gmlwo530 · Pull Request #425 · commitdev/zero

Conversation

@gmlwo530

@gmlwo530 gmlwo530 commented Oct 17, 2021

Copy link
Copy Markdown
Contributor

enhancement: git push command use branch name from init.defaultBranch in git config.

(For #424)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
bmonkman
bmonkman reviewed Oct 19, 2021
View reviewed changes
Comment thread internal/vcs/create-git-repos.go Outdated
output, err := cmd.CombinedOutput()

if err != nil {
initDefaultBranch = "master"

@bmonkman bmonkman Oct 19, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Let's return main instead, as this is the default in GitHub anyway.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gmlwo530 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@bmonkman bmonkman Oct 19, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Also, mind sticking with the Go convention of having the happy path be left aligned without the explicit else? Like:

if err != nil {
 return "main"
}
return string(output)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gmlwo530 gmlwo530 Oct 20, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for the feedback! I will fix it and push on gmlwo530:initialCommit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gmlwo530
enhancement: git push command use branch name from init.defaultBranch…
9a1fc2f
… in git config
@gmlwo530
gmlwo530 force-pushed the initialCommit branch from b05a3bc to 9a1fc2f Compare October 20, 2021 12:03
@gmlwo530
gmlwo530 requested a review from bmonkman October 20, 2021 12:03
bmonkman
bmonkman reviewed Oct 20, 2021
View reviewed changes

@bmonkman bmonkman left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks a lot!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gmlwo530 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
bmonkman
bmonkman approved these changes Oct 20, 2021
View reviewed changes
@bmonkman
bmonkman merged commit 0c9bf0c into commitdev:main Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@bmonkman bmonkman bmonkman approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@gmlwo530 @bmonkman
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.