git update-git-for-windows: optionally update from a fork#338
git update-git-for-windows: optionally update from a fork#338dscho merged 1 commit intogit-for-windows:mainfrom
Conversation
|
I should add that I did test this and it works as advertised. |
|
This'll work for microsoft/git, but don't we need a way to specify the installer suffix for ARM64? |
Good point... I think we will have to extend the |
git-extra/git-update-git-for-windows
Outdated
| then | ||
| fork="$(git config -f "$0.config" update.fromFork)" | ||
| test -n "$fork" || { | ||
| echo "Could not find update.fromFork in $0.config" >&2 |
There was a problem hiding this comment.
I get that end users shouldn't edit this config, but maybe we should fall back to the same behaviour we use when $0.config doesn't exist.
Wether the file exists or not, it's basically an unset config option.
There was a problem hiding this comment.
True. I now treat a .config file without update.fromFork the same as if the .config file was absent.
I'm back! 😊 Created a PR on top of this one to detect ARM64: #340 - it simply checks if the |
dennisameling
left a comment
There was a problem hiding this comment.
Can confirm that this works as described 👍🏼
For the upcoming ARM64 support, as well as for the Microsoft fork of Git for Windows, it would be helpful if there was a way to update from the GitHub Releases of the respective fork instead of Git for Windows' own fork. To facilitate that, let's introduce support for a `git-update-git-for-windows.config` file next to the script: if it exists, treat it as a Git config file and read the `update.fromFork` value, and then continue with that value inserted into the URL https://github.com/<fork>/releases. Example: to ask the updater to look for new versions at https://github.com/dennisameling/git/releases, run the following command as administrator: git config \ -f "$(git --exec-path)/git-update-git-for-windows.config" \ update.fromFork dennisameling/git This also overrides the label "Git for Windows" with "Git"; The `update.gitLabel` setting in the same `.config` file can be used to over-override this. If the `.config` file does not contain any `update.fromFork`, the file is ignored altogether. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We do a little bit more in the Git wrapper: we also confirm that we're running on ARM64. Therefore, it would be technically "more correct" if we introduced, say, But I think that is overkill, so let's go with your solution for now.
Could I ask you to test again? I changed the patch slightly in response to #338 (review). |
|
@dscho Sorry for the late reply, was planning to test earlier, but was firefighting at work in the last few days 😅 Config: Output: Toast also looking good: Thanks! 🚀 |
|
No worries, I was quite distracted, too. Thanks for testing! |

For the upcoming ARM64 support, as well as for the Microsoft fork of Git for Windows, it would be helpful if there was a way to update from the GitHub Releases of the respective fork instead of Git for Windows' own fork. This PR makes that easy.T o ask the updater to look for new versions at, say, https://github.com/dennisameling/git/releases, run the following command
as administrator:
Cc: @dennisameling