mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
refactor: Simplify Git repository discovery and improve user prompts
This commit is contained in:
parent
32377a93ae
commit
36aae9cef3
1 changed files with 4 additions and 6 deletions
|
@ -24,14 +24,12 @@ from .dump import dump # noqa: F401
|
|||
|
||||
def setup_git_home(io):
|
||||
home = Path.home()
|
||||
home_git = home / ".git"
|
||||
git_repos = [home_git] if home_git.exists() else []
|
||||
git_repos.extend(home.glob("*/.git"))
|
||||
git_repos = home.glob("*/.git")
|
||||
|
||||
if git_repos:
|
||||
io.tool_output("Found existing Git repositories in your home directory:")
|
||||
for i, repo in enumerate(git_repos, 1):
|
||||
repo_name = "Home directory" if repo == home_git else repo.parent.name
|
||||
repo_name = repo.parent.name
|
||||
io.tool_output(f"{i}. {repo_name}")
|
||||
|
||||
while True:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue