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-extra: more really only add the aarch64 repository for git-sdk-arm64 #501

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PhilipOakley
Copy link
Contributor

This follows up on git-for-windows/git#4408 (comment).

The referenced commit included additional grepping for installing part of the aarch64 repository which I think isn't necessary here, but I could easily be wrong.

I'm about to go off-line for 4 days, and with -rc0 imminent I thought it worthwhile to at least get started, even if I haven't had time to test it.

257a670 (git-extra: really only add the aarch64 repository for git-sdk-arm64, 2023-02-11) missed two additional places that needed the extra checks.

This fixes issue: #4408 sdk gitk interaction

Helped-by: Johannes Schindelin johannes.schindelin@gmx.de
Signed-off-by: Philip Oakley philipoakley@iee.email

257a670 (git-extra: really only add the aarch64 repository for
git-sdk-arm64, 2023-02-11) missed two additional places that needed
the extra checks.

This fixes issue: #4408 `sdk gitk interaction`

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Philip Oakley <philipoakley@iee.email>
@PhilipOakley
Copy link
Contributor Author

Hmm. forgot the "Validating source files with sha256sums..." Need to update those checksums. Though don't have time just now.

@dscho dscho marked this pull request as draft May 15, 2023 07:35
@@ -80,7 +80,7 @@ sdk () {
case "$(uname -m)" in
i686) shortcut_suffix=" 32-bit";;
x86_64)
if test -d /clangarm64
if test -z "$(find /clangarm64 -type f -print -quit)" || # if /clangarm64 exists and contains at least one file
Copy link
Member

Choose a reason for hiding this comment

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

It's probably worth refactoring this into its own function (something like is_aarch64_setup).

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'll look into that refactoring.

There was one issue I saw with the code that may be due to my ignorance of some bash idioms. When I copied the change into my C:\git-sdk-64\etc\profile.d\git-sdk.sh (where this is installed), I found that I'd get a syntax error at startup, probably due to the way the double quotes and || (or) interact with the # comment.

In the original 257a670 (git-extra: really only add the aarch64 repository for git-sdk-arm64, 2023-02-11) there is only a single opening 'double quote' for the "$(find ...), which looks 'odd' to me - is that (the possible use of the || as an alternate close quote) an idiom I'm not aware of?

If I 'correct' the conditional to either add an echo "here", or a : (colon) just after the || (or), then the error disappears (obvs. fixed in two places).

What am I missing?

Copy link
Member

Choose a reason for hiding this comment

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

I found that I'd get a syntax error at startup, probably due to the way the double quotes and || (or) interact with the # comment.

No, the reason is that the || should not be here. That's a logical "or" operator, and there is no expression to "or it against". You need to remove it.

In the original 257a670 (git-extra: really only add the aarch64 repository for git-sdk-arm64, 2023-02-11) there is only a single opening 'double quote' for the "$(find ...), which looks 'odd' to me - is that (the possible use of the || as an alternate close quote) an idiom I'm not aware of?

That was a bug, hence fixed ("View git blame" can help you find such answers).

@wayneforrest
Copy link

wayneforrest commented May 25, 2023

can't wait for this one ... I really would like to have a MINGW.. ARM install.

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