Skip to content

Conversation

@Stef16Robbe
Copy link
Contributor

@Stef16Robbe Stef16Robbe commented Oct 21, 2025

Continuation of #918
Closes #806

New PR since I deleted my old fork :D. Also includes improvements based on original comments.

What does this PR do

add fetch_only to config in case user wants to only fetch, not already pull changes

Standards checklist

  • The PR title is descriptive
  • I have read CONTRIBUTING.md
  • Optional: I have tested the code myself
  • If this PR introduces new user-facing messages they are translated

For new steps

  • Optional: Topgrade skips this step where needed
  • Optional: The --dry-run option works with this step
  • Optional: The --yes option works with this step if it is supported by
    the underlying command

If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.

@GideonBear
Copy link
Member

I added "closes #806" to make sure GitHub understands that it closes that issue

Comment on lines +51 to +66
"Pulling":
en: "Pulling"
lt: "Traukiama"
es: "Extrayendo"
fr: "Récupération"
zh_CN: "正在拉取"
zh_TW: "正在拉取"
de: "Abrufen"
"Fetching":
en: "Fetching"
lt: "Gaunama"
es: "Obteniendo"
fr: "Récupération"
zh_CN: "正在获取"
zh_TW: "正在獲取"
de: "Abrufen"
Copy link
Member

Choose a reason for hiding this comment

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

Some of these overlap (fr, zh*, de). Is there some translated Git documentation that you can reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could have a look but this is just Claude translated

Comment on lines 331 to 333
let result = if is_fetch_only {
output_checked_utf8(pull_or_fetch_output)
} else {
Copy link
Member

Choose a reason for hiding this comment

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

Particular reason we don't want to git submodule update --recursive in fetch_only? Is there some kind of git submodule fetch --recursive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was suggested in the original PR. What do we think of git submodule foreach --recursive git fetch?

Copy link
Member

Choose a reason for hiding this comment

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

How about just git fetch --recurse-submodules? Can we use git pull --ff-only --recurse-submodules as well, instead of a seperate git submodule update --recursive call? Or is there a difference?

Comment on lines 331 to 333
let result = if is_fetch_only {
output_checked_utf8(pull_or_fetch_output)
} else {
Copy link
Member

Choose a reason for hiding this comment

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

How about just git fetch --recurse-submodules? Can we use git pull --ff-only --recurse-submodules as well, instead of a seperate git submodule update --recursive call? Or is there a difference?

# ]

# Don't pull the predefined git repos
# Don't pull/fetch the predefined git repos
Copy link
Member

Choose a reason for hiding this comment

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

Not your code, but this is a bit confusing

Suggested change
# Don't pull/fetch the predefined git repos
# Set to `false` to skip pulling/fetching the predefined git repos

@GideonBear
Copy link
Member

Aaaah GitHub review is confusing... Sorry if a comment is duplicated or out of place

@GideonBear GideonBear changed the title feat: add option to only fetch repositories feat(git): add option to only fetch repositories Oct 31, 2025
@GideonBear GideonBear changed the title feat(git): add option to only fetch repositories feat(git): add option to fetch instead of pull repositories Oct 31, 2025
@GideonBear
Copy link
Member

Hi, do you have any idea when you're able to work on this again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git support fetch only

2 participants