{"thread":{"id":"60616","subject":"Question regarding Git updater","startedAt":"2023-12-14T16:44:51Z","lastAt":"2023-12-18T11:21:42Z","messageCount":3,"participants":["Andreas Scholz","Jeff King","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"485658","messageId":"CAHDWvZyHDbjOnnCYCkfMY+HPWobrcgP6c1kkWFrRgWV4fHED=w@mail.gmail.com","threadId":"60616","inReplyTo":null,"subject":"Question regarding Git updater","fromName":"Andreas Scholz","fromEmail":"andr3asr@gmail.com","sentAt":"2023-12-14T16:44:41Z","receivedAt":"2023-12-14T16:44:51Z","isPatch":false,"sender":{"key":"andr3asr@gmail.com","avatar":null},"body":"Hi\n\nI hope you can help me with answering my question regarding the update\nmechanism for Git after it has been installed.\n\n1) Does the updater autonomously figure out if there is a newer\nversion than the current one that is installed?\n\n2) Or does the updater only ask, when the user actively uses a command\nto ask Git to check for a newer version?\n\n3) In both cases, what information about the user/system is sent with\nthe request? Is this information stored on a server or database etc.?\n\nBR\n\nAndreas\n"},{"id":"485671","messageId":"20231214221239.GB3320432@coredump.intra.peff.net","threadId":"60616","inReplyTo":"CAHDWvZyHDbjOnnCYCkfMY+HPWobrcgP6c1kkWFrRgWV4fHED=w@mail.gmail.com","subject":"Re: Question regarding Git updater","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2023-12-14T22:12:39Z","receivedAt":"2023-12-14T22:12:40Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Dec 14, 2023 at 05:44:41PM +0100, Andreas Scholz wrote:\n\n> I hope you can help me with answering my question regarding the update\n> mechanism for Git after it has been installed.\n\nYou may need to be more specific here about how you're installing Git.\nThe Git project itself does not ship any binary packages at all, let\nalone ones that have an update mechanism.\n\nIf you're using the Git for Windows installer, it looks like it does\nhave an auto-update feature:\n\n https://github.com/git-for-windows/build-extra/blob/15b05c2399f152783d1fe9f167692dd5cd8ae1e1/installer/install.iss#L114\n\nYou might get a response on this list from Git for Windows folks, but\nthere is also a separate Git for Windows list:\n\n  https://groups.google.com/g/git-for-windows\n\nYou may be more likely to get a response there, or opening an issue on\nthe GitHub repo:\n\n  https://github.com/git-for-windows/git\n\nIf you're using something else, you may have to ask the specific\npackager.\n\n-Peff\n"},{"id":"485773","messageId":"20f16646-7bb4-b8bc-dcda-861c1e3fe2a6@gmx.de","threadId":"60616","inReplyTo":"CAHDWvZyHDbjOnnCYCkfMY+HPWobrcgP6c1kkWFrRgWV4fHED=w@mail.gmail.com","subject":"Re: Question regarding Git updater","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2023-12-18T11:21:39Z","receivedAt":"2023-12-18T11:21:42Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Andreas,\n\nOn Thu, 14 Dec 2023, Andreas Scholz wrote:\n\n> I hope you can help me with answering my question regarding the update\n> mechanism for Git after it has been installed.\n\nAssuming that you mean Git for Windows and its updater that you can enable\nby checking the \"Check daily for Git for Windows updates\" option on the\nComponents page, I will provide answers below (if you are not talking\nabout Git for Windows, I apologize, and ask for clarification):\n\n> 1) Does the updater autonomously figure out if there is a newer\n> version than the current one that is installed?\n\nGit for Windows' updater is backed by a Unix shell script:\nhttps://github.com/git-for-windows/build-extra/blob/HEAD/git-extra/git-update-git-for-windows\n\nWhen configured to run regularly via a scheduled task, it will be called\nwith the options `--quiet --gui`. It starts by determining the latest tag:\nhttps://github.com/git-for-windows/build-extra/blob/15b05c2399f152783d1fe9f167692dd5cd8ae1e1/git-extra/git-update-git-for-windows#L222\nwhich downloads https://gitforwindows.org/latest-tag.txt, a file that is\nhosted on GitHub Pages and that is updated as part of every Git for\nWindows release.\n\nThe script then continues by determining the local version:\nhttps://github.com/git-for-windows/build-extra/blob/15b05c2399f152783d1fe9f167692dd5cd8ae1e1/git-extra/git-update-git-for-windows#L248\nand comparing both versions:\nhttps://github.com/git-for-windows/build-extra/blob/15b05c2399f152783d1fe9f167692dd5cd8ae1e1/git-extra/git-update-git-for-windows#L257-L262\nexiting with success if they match.\n\nMost notably, it does _not_ verify that the remote version is newer,\nmeaning: If you build and install a custom Git version that reports a\nversion number, say, 100.100.100, the updater will still propose to update\nfrom that, even if the current version is v2.43.0.\n\n> 2) Or does the updater only ask, when the user actively uses a command\n> to ask Git to check for a newer version?\n\nUsers are welcome to run `git update-git-for-windows` manually. If\naforementioned checkbox was checked during installation, this won't be\nnecessary, strictly speaking.\n\n> 3) In both cases, what information about the user/system is sent with\n> the request? Is this information stored on a server or database etc.?\n\nThe information that is sent is the IP address and the HTTP headers sent\nby `curl` in\nhttps://github.com/git-for-windows/build-extra/blob/15b05c2399f152783d1fe9f167692dd5cd8ae1e1/git-extra/git-update-git-for-windows#L120-L125\ni.e. a User-Agent (`curl` does not seem to include the current OS there),\nbut not the current Git for Windows version (an information that, if\navailable, would actually help me perform my role of Git for Windows\nmaintainer a lot better). Since the request goes to GitHub Pages, which\ndoes not store any information, all of that information vanishes right\nafter the HTTP response is sent.\n\nCiao,\nJohannes\n"}]}