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

rename "git update" to "git update-git-for-windows" #167

Merged
merged 2 commits into from
Feb 1, 2018

Conversation

larsxschneider
Copy link
Member

@larsxschneider larsxschneider commented Jan 17, 2018

In 1da13c5 (Keep Git for Windows up to date via the command-line,
2017-08-11) we added a command to download and install the latest
Git for Windows version. We called this command "git update".

Users, especially Git novices, could easily view the verb "update" as
Git version control operation. Fix the ambiguity by renaming it to
"self-upgrade".

@bufferoverflow
Copy link
Contributor

Fully agree on this, it makes sense to rename that, git self-upgrade might be another option.

@larsxschneider
Copy link
Member Author

Thanks. I also contemplated about git dist-upgrade. Let's see if others chime in.

@dscho
Copy link
Member

dscho commented Jan 17, 2018

FWIW I like git upgrade-git. But I also like git self-upgrade...

@@ -115,6 +115,6 @@ package() {
install -m644 msys2-32.ico $pkgdir/usr/share/git
install -m644 99-post-install-cleanup.post $pkgdir/etc/post-install
install -m755 astextplain $pkgdir/usr/bin
install -m755 git-update $pkgdir${MINGW_PREFIX}/libexec/git-core
install -m755 git-upgrade $pkgdir${MINGW_PREFIX}/libexec/git-core

This comment was marked as off-topic.

This comment was marked as off-topic.

@larsxschneider
Copy link
Member Author

Sounds like git self-upgrade would work for all of us 🎉 (@bufferoverflow , @dscho , and me).

@between2spaces, @viceice, @landstander668 : you helped on the initial git update. Would you be OK with a rename to git self-upgrade?

@viceice
Copy link

viceice commented Jan 18, 2018

Looks good to me. 👍

@larsxschneider larsxschneider force-pushed the lars/rename-update branch 2 times, most recently from 6e06d83 to 9ede042 Compare January 18, 2018 16:44
@@ -237,7 +237,7 @@ git_update () {
esac
elif test -n "$use_gui"
then
git gui--askyesno --title "Git Update Available" \
git gui--askyesno --title "Git Upgrade Available" \

This comment was marked as off-topic.

@larsxschneider
Copy link
Member Author

I've changed it to git self-upgrade. I hope I have found all instances of git update. TBH I didn't do any testing (yet) as my dev machine is no Windows box.

@larsxschneider larsxschneider changed the title rename "git update" to "git upgrade" rename "git update" to "git self-upgrade" Jan 23, 2018
@larsxschneider
Copy link
Member Author

@dscho What is the best way to test this PR?

I've installed the latest 64 SDK. The first please.sh calls (according to the docs) don't work for me (but this is likely unrelated to my change here):

lars@winbox MINGW64 /usr/src/build-extra (lars/rename-update)
$ ./please.sh sync
No 32-bit Git for Windows SDK found at location:

        C:/git-sdk-32
Config variable to override: windows.sdk32.path
:: Synchronizing package databases...
 git-for-windows is up to date
 git-for-windows-mingw32   12.7 KiB   530K/s 00:00 [#####################] 100%
 git-for-windows-min...   543.0   B  0.00B/s 00:00 [#####################] 100%
 mingw32 is up to date
 mingw64 is up to date
 msys is up to date
error launching git: The filename, directory name, or volume label syntax is inc                         orrect.
Could not update packages in

lars@winbox MINGW64 /usr/src/build-extra (lars/rename-update)
$ ./please.sh build git
No 32-bit Git for Windows SDK found at location:

        C:/git-sdk-32
Config variable to override: windows.sdk32.path
./please.sh: line 390: cd: C:/git-sdk-64//usr/src/MINGW-packages/mingw-w64-git:                          No such file or directory
C:/git-sdk-64//usr/src/MINGW-packages/mingw-w64-git does not exist
Could not run 'pkg_build' in 'C:/git-sdk-64'

Building git-extras works but installing gives me errors:

lars@winbox MINGW64 /usr/src/build-extra (lars/rename-update)
$ ./please.sh build git-extra
No 32-bit Git for Windows SDK found at location:

        C:/git-sdk-32
Config variable to override: windows.sdk32.path
=> WARNING: You don't have installed mingw-w64 toolchain for architecture i686.
=> WARNING: To install it run: 'pacman -S mingw-w64-i686-toolchain'
==> Making package: git-extra 1.1.225.cf6c25d-1 (Tue, Jan 23, 2018  1:45:43 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found inputrc
  -> Found vimrc
  -> Found vi
  -> Found notepad
  -> Found wordpad
  -> Found create-shortcut.c
  -> Found Makefile
  -> Found SystemInfo.cpp
  -> Found SystemInfo.h
  -> Found WhoUses.cpp
  -> Found git-prompt.sh
  -> Found aliases.sh
  -> Found env.sh
  -> Found bash_profile.sh
  -> Found msys2-32.ico
  -> Found 99-post-install-cleanup.post
  -> Found gitattributes
  -> Found astextplain
  -> Found git-sdk.sh
  -> Found git-self-upgrade
  -> Found blocked-file-util.c
  -> Found zzz_rm_stackdumps.sh
  -> Found proxy-lookup.c
==> Validating source files with sha256sums...
    inputrc ... Passed
    vimrc ... Passed
    vi ... Passed
    notepad ... Passed
    wordpad ... Passed
    create-shortcut.c ... Passed
    Makefile ... Passed
    SystemInfo.cpp ... Passed
    SystemInfo.h ... Passed
    WhoUses.cpp ... Passed
    git-prompt.sh ... Passed
    aliases.sh ... Passed
    env.sh ... Passed
    bash_profile.sh ... Passed
    msys2-32.ico ... Passed
    99-post-install-cleanup.post ... Passed
    gitattributes ... Passed
    astextplain ... Passed
    git-sdk.sh ... Passed
    git-self-upgrade ... Passed
    blocked-file-util.c ... Passed
    zzz_rm_stackdumps.sh ... Passed
    proxy-lookup.c ... Passed
==> Extracting sources...
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: git-extra 1.1.228.9ede042-1
==> Starting build()...
x86_64-w64-mingw32-gcc -c -march=x86-64 -mtune=generic -O2 -pipe /usr/src/build-extra/git-extra/src/create-shortcut.c -o build-x86_64-w64-mingw32/create-shortcut.o
x86_64-w64-mingw32-g++ -c -march=x86-64 -mtune=generic -O2 -pipe /usr/src/build-extra/git-extra/src/WhoUses.cpp -o build-x86_64-w64-mingw32/WhoUses.o
x86_64-w64-mingw32-g++ -c -march=x86-64 -mtune=generic -O2 -pipe /usr/src/build-extra/git-extra/src/SystemInfo.cpp -o build-x86_64-w64-mingw32/SystemInfo.o
x86_64-w64-mingw32-gcc -c -march=x86-64 -mtune=generic -O2 -pipe /usr/src/build-extra/git-extra/src/blocked-file-util.c -o build-x86_64-w64-mingw32/blocked-file-util.o
x86_64-w64-mingw32-gcc -c -march=x86-64 -mtune=generic -O2 -pipe /usr/src/build-extra/git-extra/src/proxy-lookup.c -o build-x86_64-w64-mingw32/proxy-lookup.o
x86_64-w64-mingw32-gcc -march=x86-64 -mtune=generic -O2 -pipe -o build-x86_64-w64-mingw32/proxy-lookup.exe build-x86_64-w64-mingw32/proxy-lookup.o -lshell32 -lwinhttp
x86_64-w64-mingw32-gcc -march=x86-64 -mtune=generic -O2 -pipe -o build-x86_64-w64-mingw32/blocked-file-util.exe build-x86_64-w64-mingw32/blocked-file-util.o
x86_64-w64-mingw32-gcc -march=x86-64 -mtune=generic -O2 -pipe -o build-x86_64-w64-mingw32/create-shortcut.exe build-x86_64-w64-mingw32/create-shortcut.o -luuid -lole32
x86_64-w64-mingw32-g++ -march=x86-64 -mtune=generic -O2 -pipe -o build-x86_64-w64-mingw32/WhoUses.exe build-x86_64-w64-mingw32/WhoUses.o build-x86_64-w64-mingw32/SystemInfo.o
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "git-extra"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Finished making: git-extra 1.1.228.9ede042-1 (Tue, Jan 23, 2018  1:45:59 PM)
==> Making package: git-extra 1.1.228.9ede042-1 (Tue, Jan 23, 2018  1:46:01 PM)
==> Retrieving sources...
  -> Found inputrc
  -> Found vimrc
  -> Found vi
  -> Found notepad
  -> Found wordpad
  -> Found create-shortcut.c
  -> Found Makefile
  -> Found SystemInfo.cpp
  -> Found SystemInfo.h
  -> Found WhoUses.cpp
  -> Found git-prompt.sh
  -> Found aliases.sh
  -> Found env.sh
  -> Found bash_profile.sh
  -> Found msys2-32.ico
  -> Found 99-post-install-cleanup.post
  -> Found gitattributes
  -> Found astextplain
  -> Found git-sdk.sh
  -> Found git-self-upgrade
  -> Found blocked-file-util.c
  -> Found zzz_rm_stackdumps.sh
  -> Found proxy-lookup.c
==> Validating source files with sha256sums...
    inputrc ... Passed
    vimrc ... Passed
    vi ... Passed
    notepad ... Passed
    wordpad ... Passed
    create-shortcut.c ... Passed
    Makefile ... Passed
    SystemInfo.cpp ... Passed
    SystemInfo.h ... Passed
    WhoUses.cpp ... Passed
    git-prompt.sh ... Passed
    aliases.sh ... Passed
    env.sh ... Passed
    bash_profile.sh ... Passed
    msys2-32.ico ... Passed
    99-post-install-cleanup.post ... Passed
    gitattributes ... Passed
    astextplain ... Passed
    git-sdk.sh ... Passed
    git-self-upgrade ... Passed
    blocked-file-util.c ... Passed
    zzz_rm_stackdumps.sh ... Passed
    proxy-lookup.c ... Passed
==> Creating source package...
  -> Adding PKGBUILD...
  -> Generating .SRCINFO file...
  -> Adding inputrc...
  -> Adding vimrc...
  -> Adding vi...
  -> Adding notepad...
  -> Adding wordpad...
  -> Adding create-shortcut.c...
  -> Adding Makefile...
  -> Adding SystemInfo.cpp...
  -> Adding SystemInfo.h...
  -> Adding WhoUses.cpp...
  -> Adding git-prompt.sh...
  -> Adding aliases.sh...
  -> Adding env.sh...
  -> Adding bash_profile.sh...
  -> Adding msys2-32.ico...
  -> Adding 99-post-install-cleanup.post...
  -> Adding gitattributes...
  -> Adding astextplain...
  -> Adding git-sdk.sh...
  -> Adding git-self-upgrade...
  -> Adding blocked-file-util.c...
  -> Adding zzz_rm_stackdumps.sh...
  -> Adding proxy-lookup.c...
  -> Adding install file (git-extra.install)...
  -> Compressing source package...
==> Source package created: git-extra (Tue, Jan 23, 2018  1:46:09 PM)
[lars/rename-update 0bd07b5] git-extra: new version
 1 file changed, 1 insertion(+), 1 deletion(-)

lars@winbox MINGW64 /usr/src/build-extra (lars/rename-update)
$ ./please.sh install git-extra
No 32-bit Git for Windows SDK found at location:

        C:/git-sdk-32
Config variable to override: windows.sdk32.path
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) git-extra-1.1.228.9ede042-1

Total Installed Size:  0.23 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                  [#################################] 100%
(1/1) checking package integrity                                [#################################] 100%
(1/1) loading package files                                     [#################################] 100%
(1/1) checking for file conflicts                               [#################################] 100%
(1/1) checking available disk space                             [#################################] 100%
:: Processing package changes...
(1/1) upgrading git-extra                                       [#################################] 100%
loading packages...
error: 'git-extra-1.1.228.9ede042-1-i686.pkg.tar.xz': could not find or read package
Could not run 'pkg_install' in 'C:/git-sdk-64'

@larsxschneider
Copy link
Member Author

@dscho Do you agree with this change in general? If yes, can you give me advice how I can move it forward?

@dscho
Copy link
Member

dscho commented Jan 31, 2018

First of all, these errors you got all stem from please.sh being optimized for my workflow, where I (almost) always have two SDKs: the 32-bit and the 64-bit one.

I kinda assumed that contributors would use makepkg-mingw and pacman directly (as suggested in https://github.com/git-for-windows/git/wiki/Package-management#rebuild-packages).

But you are right, it would be nice if please.sh simply detected the absence of the 32-bit SDK and ignored that part quietly.

As to moving this change forward, I wanted to let it simmer a little bit because I had a hunch that self-upgrade still would not quite catch what we mean. And I think I have an even better suggestion: git update-git! What do you think?

@larsxschneider
Copy link
Member Author

Naming is hard 😄 Although I slightly prefer git self-upgrade, I could live with git update-git.

However, since we don't want to change it every other day I am not against simmering a little further. What do you think about the following?
git install-update
git update-git-app
git update-git-application

My goal is to make it as clear as possible that we don't talk about source control update functions here.

@dscho
Copy link
Member

dscho commented Jan 31, 2018

My goal is to make it as clear as possible that we don't talk about source control update functions here.

Well, then we absolutely need a name that makes this abundandly clear, like update-git-for-windows.

My gripe with self-upgrade is that it is not necessarily clear to a person seeing this command for the first time to what the "self" refers. After all, there are people who "self-upgrade" themselves. That's not what this command is about.

@larsxschneider
Copy link
Member Author

Well, then we absolutely need a name that makes this abundandly clear, like update-git-for-windows.

Yeah, especially because it is (I think) unlikely that this command will ever exist for Linux or macOS as Git is distributed via package management systems there.

I wonder how common the abbreviation gfw is. git-for-windows is a bit lengthy but this is a serious operation and you don't run it every day (and if you do then you can configure an alias).

@bufferoverflow
Copy link
Contributor

I like update-git-for-windows, this is clear for every user and not confusing as the other options.

@dscho
Copy link
Member

dscho commented Feb 1, 2018

I wonder how common the abbreviation gfw is. git-for-windows

I don't like to abbreviate Git for Windows, personally, I saw GfW and G4W in the wild, but as we are trying to be abundantly clear, we cannot abbreviate it in the command anyway.

larsxschneider and others added 2 commits February 1, 2018 13:51
In 1da13c5 (Keep Git for Windows up to date via the command-line,
2017-08-11) we added a command to download and install the latest
Git for Windows version. We called this command "git update".

Users, especially Git novices, could easily view the verb "update" as
Git version control operation. Fix the ambiguity by renaming it to
"update-git-for-windows".

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In the Git for Windows project, we learned the hard way, several times,
that it is not good to just remove or rename stuff without giving the
users a chance to adjust.

In this instance, we just renamed `git update` to `git
update-git-for-windows`, and unless the user reads the release notes
(and let's be honest: only a teeny tiny fraction of the users read
those), she has no chance of knowing what to do next.

So let's be nice and add back the `git update` command; it will output
the deprecation notice and hand off to the `update-git-for-windows`
subcommand.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho force-pushed the lars/rename-update branch from 9ede042 to e4a51fd Compare February 1, 2018 12:59
@dscho dscho changed the title rename "git update" to "git self-upgrade" rename "git update" to "git update-git-for-windows" Feb 1, 2018
@dscho dscho merged commit c65fced into git-for-windows:master Feb 1, 2018
dscho added a commit that referenced this pull request Feb 1, 2018
The `git update` command [has been renamed to `git
update-git-for-windows`](#167)
to avoid confusion where users may think that `git update` updates
their local repository or worktree.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@larsxschneider
Copy link
Member Author

Thanks @dscho 🎉

@larsxschneider larsxschneider deleted the lars/rename-update branch February 1, 2018 13:05
@gqqnbig
Copy link

gqqnbig commented Feb 17, 2018

@dscho Do you plan to remove the git update completely someday?

@dscho
Copy link
Member

dscho commented Feb 19, 2018

Yes, of course.

@Klonan
Copy link

Klonan commented Aug 18, 2020

@dscho

Yes, of course.

Is now a good time to do it?

@dscho
Copy link
Member

dscho commented Aug 20, 2020

@Klonan yes! If you would prepare a PR, please?

@Klonan
Copy link

Klonan commented Aug 21, 2020

@dscho Oh I am not really a C++ type person, I only saw this because my VSCode told me to update, and it came up with deprecation notice.

@dscho
Copy link
Member

dscho commented Aug 24, 2020

Oh I am not really a C++ type person

Lucky you: no C++ is involved.

All you need to do is to remove the git-extra/git-update file, then use git grep -w git-update to remove the remaining mentions (I think it would only involve git-extra/PKGBUILD), then test-build using sdk build git-extra.

@Klonan
Copy link

Klonan commented Jan 24, 2022

You really want me to do it?

@dscho
Copy link
Member

dscho commented Jan 24, 2022

You really want me to do it?

Well, I welcome contributions, so that the burden of developing Git for Windows does not lie exclusively with me. So yes, I am happy when people step a bit outside their regular expertise, learn something new, and contribute.

@Ma-XX-oN
Copy link

@dscho Do you plan to remove the git update completely someday?

Pls don't. I find it pretty tedious to type. As long as there is a warning as to what update does, before it does it, I see no reason why it needs to be deprecated.

@PhilipOakley
Copy link
Contributor

@dscho Do you plan to remove the git update completely someday?

Pls don't. I find it pretty tedious to type. As long as there is a warning as to what update does, before it does it, I see no reason why it needs to be deprecated.

I just created an alias git up that does the rest of the typing. ;-)

up = !git update-git-for-windows

@dscho
Copy link
Member

dscho commented Mar 30, 2022

The problem with squatting on a short-and-neat name like update is, of course, that you prevent users from having an alias using that name.

The name is also too generic and not descriptive enough: "update? Update... what? What exactly is Git updating here? My worktree?"

So yes, that git update command will go away.

The good news is that you can install an alias of that name, and not notice when only the git update-git-for-windows command will remain.

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

Successfully merging this pull request may close these issues.

9 participants