Skip to content

Show default option when prompting to create a new git repo #4596

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

Conversation

Joshuahuahua
Copy link
Contributor

  • PR Description

  • Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@ChrisMcD1
Copy link
Contributor

@Joshuahuahua Hey, can you clarify a bit more what this PR is attempting to do? It just seems to change n to N, which shouldn't really matter. The only check is that the user provides y or not.

shouldInitRepo = (strings.Trim(response, " \r\n") == "y")

@Joshuahuahua
Copy link
Contributor Author

Joshuahuahua commented Jun 4, 2025

@Joshuahuahua Hey, can you clarify a bit more what this PR is attempting to do? It just seems to change n to N, which shouldn't really matter. The only check is that the user provides y or not.

shouldInitRepo = (strings.Trim(response, " \r\n") == "y")

Hey hey, I was just updating the "front-end" to reflect the logic that was programmed (if you don't type 'y' and just click enter, the "N" path is chosen). I usually see this in other CLIs and just thought to propose it here :)

@stefanhaller stefanhaller added the enhancement New feature or request label Jun 4, 2025
@stefanhaller stefanhaller force-pushed the highlight-default-create-repo-option branch from 06b0bce to bb6c883 Compare June 4, 2025 06:16
@stefanhaller
Copy link
Collaborator

Totally makes sense to me, I just forgot to come back to this last week and merge it. Thanks for the contribution.

One thing: we don't change the files in pkg/i18n/translations/ here, they are maintained on Crowdin. If you care about changing this also in the translations, please make the changes there, it will then be updated in lazygit the next time we import translations from Crowdin.

I took the liberty of dropping these changes from your branch and force-pushing.

@stefanhaller stefanhaller merged commit 36de219 into jesseduffield:master Jun 4, 2025
14 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 12, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [jesseduffield/lazygit](https://github.com/jesseduffield/lazygit) | minor | `v0.51.1` -> `v0.52.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>jesseduffield/lazygit (jesseduffield/lazygit)</summary>

### [`v0.52.0`](https://github.com/jesseduffield/lazygit/releases/tag/v0.52.0)

[Compare Source](jesseduffield/lazygit@v0.51.1...v0.52.0)

<!-- Release notes generated using configuration in .github/release.yml at v0.52.0 -->

#### What's Changed

##### Enhancements 🔥

-   Add user config for hiding the root item in the file tree by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4593
-   Use branchPrefix when moving commits to new branch by [@&#8203;EliasA5](https://github.com/EliasA5) in jesseduffield/lazygit#4604
-   Show default option when prompting to create a new git repo by [@&#8203;Joshuahuahua](https://github.com/Joshuahuahua) in jesseduffield/lazygit#4596

##### Fixes 🔧

-   Fix selecting large hunks, and fix problems editing very long commit descriptions by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4589
-   Kill background fetch when it requests a passphrase by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4588
-   Fix branch selection jumping back on background fetch by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4597
-   Fix resetting to a branch when a tag shares the same name, or vice versa by [@&#8203;ChrisMcD1](https://github.com/ChrisMcD1) in jesseduffield/lazygit#4571
-   Fix wrong inactive highlight when switching between repos by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4621
-   Fix assigning custom key to pullFiles command in the Commits panel by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4617

##### Maintenance ⚙️

-   Replace literal with ConfigFilename constant by [@&#8203;mloskot](https://github.com/mloskot) in jesseduffield/lazygit#4613
-   Improve MR template wrt release notes by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4607

#### New Contributors

-   [@&#8203;mloskot](https://github.com/mloskot) made their first contribution in jesseduffield/lazygit#4613
-   [@&#8203;Joshuahuahua](https://github.com/Joshuahuahua) made their first contribution in jesseduffield/lazygit#4596

**Full Changelog**: jesseduffield/lazygit@v0.51.1...v0.52.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC41MC4wIiwidXBkYXRlZEluVmVyIjoiNDAuNTAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants