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-bash.exe not working when git installed in root (e.g. D:\Git) #509

Closed
tavrez opened this issue Oct 26, 2015 · 7 comments
Closed

git-bash.exe not working when git installed in root (e.g. D:\Git) #509

tavrez opened this issue Oct 26, 2015 · 7 comments

Comments

@tavrez
Copy link

tavrez commented Oct 26, 2015

I tested this only with default terminal emulator being command prompt. Git-bash.exe will says "cannot find the file"

@linquize
Copy link

which version?

@tavrez
Copy link
Author

tavrez commented Oct 26, 2015

2.6.2 64-bit
I also notified that this file is working fine during installation, but post-installation process will do something to this file resulting on not openning bash properly

@ketiketa
Copy link

This problem is also present when doing a "classic" install for Git-2.6.2-32-bit (problem exists also in Git-2.6.1-32-bit).

During installation, git-bash.exe (63439d2b6980835d1f67e8ac7260dd050ffdbb87) is copied to "C:\Program Files (x86)\Git" and then at the end of the installation process, git-bash.exe is truncated to a 27kB file (596b198418a97437718d26ef920b9c5a4a964aee).

The resulting truncated git-bash.exe is considered malware for some AV (https://www.virustotal.com/fr/file/9f9b2f190b5bd91a42a3e8ee09f0edc12254ba7c18ede54cb4382d512a55c1f8/analysis/1445947552/).

The truncation is mainly the removal of end data starting at :

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">.

@dscho
Copy link
Member

dscho commented Oct 28, 2015

@ketiketa you are reporting a completely unrelated "bug" here. Please do not do that. Open a different ticket, or even better: try your hand at a solution and open a Pull Request (you need to look here to see what is "truncating" git-bash.exe).

@dscho
Copy link
Member

dscho commented Oct 28, 2015

@tavrez I cannot reproduce here. Installing with Git-2.6.2-64-bit.exe /dir=c:\issue-509 and selecting the default Windows console for use with Git Bash works here:

issue-509

@tavrez
Copy link
Author

tavrez commented Oct 28, 2015

I've tested installation process near 8 times after this, as I got it's related to length of the folder, all this folders failed when I tested:
c:\iss
c:\isss
c:\issss
c:\isssss
that's up to 6 letters, when I go on 7, it will become correct, like your test example, or this:
c:\issssss
I should also say that the only exe which become corrupted is git-bash.exe, not bin\bash.exe or anything else, but because they are not setting all env variables and context menu is using git-bash.exe, this is little important to be fixed.
Another thing is git-bash.exe should not be open in the post installation process, if it was, nothing can touch it and it will work perfectly :)
I should also say that this git-bash.exe has an icon at beggining, and it will gone after post-install process :(

@dscho
Copy link
Member

dscho commented Nov 1, 2015

Finally got it...

@dscho dscho closed this as completed in 1e94972 Nov 1, 2015
dscho added a commit to dscho/git that referenced this issue Nov 7, 2015
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes git-for-windows#509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/build-extra that referenced this issue Nov 9, 2015
This topic branch waited a long time to be completed, and the final push
was provided by the need to investigate the reason for the bug reported in
git-for-windows/git#509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Dec 11, 2015
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Jan 5, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to dscho/git that referenced this issue Jan 12, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes git-for-windows#509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to dscho/git that referenced this issue Jan 14, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes git-for-windows#509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to dscho/git that referenced this issue Jan 15, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes git-for-windows#509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 13, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 13, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 13, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 15, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 15, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 15, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 15, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 20, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 20, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 22, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 22, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 22, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 25, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 25, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 25, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 26, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 26, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 27, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit that referenced this issue Aug 28, 2016
To be precise: when the value of the environment variable is shorter than
its name, we have to move the remaining bytes *after* expanding the
environment variable: we would look for the wrong name otherwise.

When the value is longer than the name, we still need to move the bytes
out of the way first, to avoid overwriting them with the interpolated
text.

This fixes #509

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to dscho/git that referenced this issue Jun 3, 2022
…gcc-12-msftgit

ci: fix `windows-build` with GCC v12.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants