Skip to content

Add config value for skipping "Recent repositories" prompt #4667

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gforien
Copy link

@gforien gforien commented Jun 26, 2025

  • PR Description
    The configuration key notARepository configures the action to be taken when opening Lazygit outside of a git repo.

Current possible values are

  • 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo
  • 'create': initialize a new repo
  • 'skip': open most recent repo
  • 'quit': exit Lazygit

With notARepository: skip, the most recent repository is selected, but a "Recent repositories" prompt is still opened.

Proposed change:

  • notARepository: recent open most recent repo and the "Recent repositories" prompt
  • notARepository: skip open most recent repo and skip the prompt

Related issue: #3129

  • 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

@gforien gforien force-pushed the fix/skip-recent-repositories branch from 5c52dd3 to 0781e7f Compare June 26, 2025 03:27
@gforien gforien marked this pull request as ready for review June 26, 2025 03:30
The configuration key `notARepository` configures the action
to be taken when opening Lazygit outside of a git repo.

Possible values
- 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo
- 'create': initialize a new repo
- 'skip': open most recent repo
- 'quit': exit Lazygit

With `notARepository: skip`, the most recent repository is selected,
but a "Recent repositories" prompt is still opened.

Proposed change:
- `notARepository: recent` opens the "Recent repositories" prompt
- `notARepository: skip` skips the modal
@gforien gforien force-pushed the fix/skip-recent-repositories branch from 0781e7f to b005730 Compare June 26, 2025 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant