Skip to content
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

Git support fetch only #806

Open
clinta opened this issue May 18, 2024 · 2 comments · May be fixed by #918
Open

Git support fetch only #806

clinta opened this issue May 18, 2024 · 2 comments · May be fixed by #918
Labels
C-feature request New feature request

Comments

@clinta
Copy link

clinta commented May 18, 2024

An option to only fetch git repos instead of pulling them would be appreciated. I do not want my git working directory changed by topgrade. But a git fetch would be useful so I can instantly pull in the future.

@clinta clinta added the C-feature request New feature request label May 18, 2024
@SteveLauC
Copy link
Member

This looks like a reasonable feature, I think we can have a configuration entry to enable it:

[git]
# How many repos to pull at max in parallel
# max_concurrency = 5

# Additional git repositories to pull
# repos = [
#     "~/src/*/",
#     "~/.config/something"
# ]

# Don't pull the predefined git repos
# pull_predefined = false

# Arguments to pass Git when pulling Repositories
# arguments = "--rebase --autostash"

# If enabled, Topgrade only `git fetch`s the specified repositories instead of pulling them
fetch_only = false 

Stef16Robbe added a commit to Stef16Robbe/topgrade that referenced this issue Sep 27, 2024
add `fetch_only` to config in case user wants to only fetch, not already
pull changes

Closes topgrade-rs#806
@SteveLauC SteveLauC linked a pull request Sep 28, 2024 that will close this issue
6 tasks
@Walther
Copy link

Walther commented Dec 31, 2024

Idly pondering if a slightly more general approach could be useful. For example, being able to configure update_command with a default of git pull to any override like git fetch or something else. Alternatively, perhaps there could even be a higher-level abstraction for various VCS systems, each with their own update_command default (and optional override). These thoughts are coming from #1012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature request New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants