Skip to content

Commit b6c5ba6

Browse files
committed
Fix Coverity builds (#5672)
As of three months ago, Git for Windows' [Coverity builds fail](https://github.com/git-for-windows/git/actions/workflows/coverity.yml?query=branch%3Amain). The reason is most likely the most recent release, 2025.3. Its [release notes](https://documentation.blackduck.com/bundle/coverity-docs/page/webhelp-files/relnotes_latest.html) do not shed any light into the issue (and does not mention that they bundle JDK20 and JDK22 in addition to JRE, because what's better than a single Java installation: three, right?). My investigation turned up `.dll` files that are located in Coverity's `bin/` directory which have the same name as `.dll` files in Git for Windows' SDK. As a consequence, the former override the latter and throw off MSYS2's logic to find the MSYS2 root directory given the location of certain `.dll` files. This PR fixes this issue, and while at it, enhances the Coverity workflow to print out the build log in case of failure.
2 parents 0fe092d + 5ce9ac2 commit b6c5ba6

File tree

6 files changed

+70
-1
lines changed

6 files changed

+70
-1
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
- [ ] I was not able to find an [open](https://github.com/git-for-windows/git/issues?q=is%3Aopen) or [closed](https://github.com/git-for-windows/git/issues?q=is%3Aclosed) issue matching what I'm seeing
2+
3+
### Setup
4+
5+
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
6+
7+
```
8+
$ git --version --build-options
9+
10+
** insert your machine's response here **
11+
```
12+
13+
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
14+
15+
```
16+
$ cmd.exe /c ver
17+
18+
** insert your machine's response here **
19+
```
20+
21+
- What options did you set as part of the installation? Or did you choose the
22+
defaults?
23+
24+
```
25+
# One of the following:
26+
> type "C:\Program Files\Git\etc\install-options.txt"
27+
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
28+
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
29+
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
30+
$ cat /etc/install-options.txt
31+
32+
** insert your machine's response here **
33+
```
34+
35+
- Any other interesting things about your environment that might be related
36+
to the issue you're seeing?
37+
38+
** insert your response here **
39+
40+
### Details
41+
42+
- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
43+
44+
** insert your response here **
45+
46+
- What commands did you run to trigger this issue? If you can provide a
47+
[Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)
48+
this will help us understand the issue.
49+
50+
```
51+
** insert your commands here **
52+
```
53+
- What did you expect to occur after running these commands?
54+
55+
** insert here **
56+
57+
- What actually happened instead?
58+
59+
** insert here **
60+
61+
- If the problem was occurring with a specific repository, can you provide the
62+
URL to that repository to help us with testing?
63+
64+
** insert URL here **

Documentation/technical/api-path-walk.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ See example usages in:
7979
`t/helper/test-path-walk.c`,
8080
`builtin/pack-objects.c`,
8181
`builtin/backfill.c`
82+
`builtin/pack-objects.c`

builtin/pack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4672,7 +4672,7 @@ static void get_object_list(struct rev_info *revs, int ac, const char **av)
46724672

46734673
warn_on_object_refname_ambiguity = save_warning;
46744674

4675-
if (use_bitmap_index && !get_object_list_from_bitmap(revs))
4675+
if (use_bitmap_index && !path_walk && !get_object_list_from_bitmap(revs))
46764676
return;
46774677

46784678
if (use_delta_islands)

ci/run-build-and-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ linux-TEST-vars)
2626
export GIT_TEST_NO_WRITE_REV_INDEX=1
2727
export GIT_TEST_CHECKOUT_WORKERS=2
2828
export GIT_TEST_PACK_USE_BITMAP_BOUNDARY_TRAVERSAL=1
29+
export GIT_TEST_PACK_PATH_WALK=1
2930
;;
3031
linux-clang)
3132
export GIT_TEST_DEFAULT_HASH=sha1

preload-index.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
static struct fscache *fscache;
2424

25+
static struct fscache *fscache;
26+
2527
/*
2628
* Mostly randomly chosen maximum thread counts: we
2729
* cap the parallelism to 20 threads, and we want

t/t7406-submodule-update.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,7 @@ test_expect_success 'submodule update --quiet passes quietness to fetch with a s
11031103
git clone super4 super5 &&
11041104
(cd super5 &&
11051105
# This test var can mess with the stderr output checked in this test.
1106+
GIT_TEST_PACK_PATH_WALK=0 \
11061107
GIT_TEST_NAME_HASH_VERSION=1 \
11071108
GIT_TEST_PACK_PATH_WALK=0 \
11081109
git submodule update --quiet --init --depth=1 submodule3 >out 2>err &&

0 commit comments

Comments
 (0)