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

sdk gitk interaction #4408

Closed
1 task done
PhilipOakley opened this issue May 5, 2023 · 5 comments
Closed
1 task done

sdk gitk interaction #4408

PhilipOakley opened this issue May 5, 2023 · 5 comments
Labels

Comments

@PhilipOakley
Copy link

If, in the sdk bash, I cd into the git dir and run gitk -6 &, gitk starts fine. However if I run sdk cd git first, then I get and error from gitk couldn't execute "git": file name too long during startup.

Is this happening for others? It appears odd that running the sdk script to cd into git (and check updates, etc) should have changed the operation of gitk. (the sdk's gitk is identical to my regular GfW gitk). [additional note at end]

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.40.0.windows.1
cpu: x86_64
built from commit: 1d90ca2906dd4b7ddaf0669a13c173ec579d794a
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.19045.2846]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

$ cat /etc/install-options.txt
cat: /etc/install-options.txt: No such file or directory
[It's the sdk] 
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

The sdk was reloaded on 1/4/2023 [April!]

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

sdk's bash

$ cd /c/git-sdk-64/usr/src/git
$ gitk -6 &
# clean start

$ sdk cd git
$ gitk -6 &
# warning dialog containing
couldn't execute "git": file name too long
couldn't execute "git": file name too long
    while executing
"open [concat $cmd $ids] r"
    (procedure "getallcommits" line 47)
    invoked from within
"getallcommits"
    (procedure "readcache" line 80)
    invoked from within
"readcache file1df89c235e0"
    ("eval" body line 1)
    invoked from within
"eval $script"
    (procedure "dorunq" line 11)
    invoked from within
"dorunq"
    ("after" script)


  • What did you expect to occur after running these commands?

gitk not to show the warning

  • What actually happened instead?

warning unexpectedly displayed

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

sdk cd git

when using sdk cd git-extra (which goes to a sub-dir) gitk is not faulting. Neither is sdk cd build-extra which isn't what I expected...

@PhilipOakley
Copy link
Author

Serendipity: I was catching up with older emails on the Git List and found [PATCH 0/2] gitk: handle long command-lines (24 Jan 2023) which seems to address the issue. And it also states "This fixes #1987" (Dec 17, 2018), so not sure how I missed that when searching the issues - maybe used the wrong search terms.

Still not 100% sure why the sdk cd git would trigger the issue, though it does update the PATH by adding the prefix /clangarm64/bin:/usr/bin: so it could be the latter (goes and checks) - yes, the latest GfW version has the fix, but the /usr/bin gitk does not!

Solved. It doesn't look like it's not yet applied in upstream gitk to feed back to upstream git to close the loop.

I'll close this.

@dscho
Copy link
Member

dscho commented May 6, 2023

it does update the PATH by adding the prefix /clangarm64/bin:/usr/bin:

That looks wrong. Why do you have a non-empty /clangarm64 directory? Are you using a Windows/ARM64 setup?

@PhilipOakley
Copy link
Author

That looks wrong. Why do you have a non-empty /clangarm64 directory? Are you using a Windows/ARM64 setup?

I'm not specially using Windows/ARM64. That change in path is just the result of running the sdk cd git command.

I do have a /clangarm64 directory, with its 5 sub-dirs, though all are empty.

@dscho
Copy link
Member

dscho commented May 8, 2023

I do have a /clangarm64 directory, with its 5 sub-dirs, though all are empty.

Ah. This is the faulty code. There are commands in MSYS2 that ensure that the directory exists, but it is left empty. Therefore, this code needs to be fixed similar to git-for-windows/build-extra@257a670 (and there is another test -d /clangarm64 that needs to be fixed similarly.

@PhilipOakley would you do the honors to open a PR to fix this, please?

@PhilipOakley
Copy link
Author

@dscho I'll certainly add it to the Git items I'm hoping to do (It's looks fairly simple, with good pointers to the relevant places).
I'm still a bit behind because of a number of family issues that have slowed down normally simple tasks.
Philip

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

No branches or pull requests

2 participants