Skip to content

Commit 8d3443c

Browse files
dschoGit for Windows Build Agent
authored andcommitted
Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
ci: avoid d/f conflict in vs/master
2 parents 2be12e2 + be7cdba commit 8d3443c

File tree

4 files changed

+28
-20
lines changed

4 files changed

+28
-20
lines changed

config.mak.uname

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ vcxproj:
712712
# Make .vcxproj files and add them
713713
unset QUIET_GEN QUIET_BUILT_IN; \
714714
perl contrib/buildsystems/generate -g Vcxproj
715-
git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj
715+
git add -f git.sln {*,*/lib.proj,t/helper/*}/*.vcxproj
716716

717717
# Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file
718718
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
@@ -722,16 +722,16 @@ vcxproj:
722722
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
723723
done && \
724724
echo ' </Target>' && \
725-
echo '</Project>') >git/LinkOrCopyBuiltins.targets
725+
echo '</Project>') >git.proj/LinkOrCopyBuiltins.targets
726726
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
727727
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
728728
for name in $(REMOTE_CURL_ALIASES); \
729729
do \
730730
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
731731
done && \
732732
echo ' </Target>' && \
733-
echo '</Project>') >git-remote-http/LinkOrCopyRemoteHttp.targets
734-
git add -f git/LinkOrCopyBuiltins.targets git-remote-http/LinkOrCopyRemoteHttp.targets
733+
echo '</Project>') >git-remote-http.proj/LinkOrCopyRemoteHttp.targets
734+
git add -f git.proj/LinkOrCopyBuiltins.targets git-remote-http.proj/LinkOrCopyRemoteHttp.targets
735735

736736
# Add command-list.h and config-list.h
737737
$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 config-list.h command-list.h

contrib/buildsystems/Generators/Vcxproj.pm

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ sub createProject {
5858
my $uuid = generate_guid($name);
5959
$$build_structure{"$prefix${target}_GUID"} = $uuid;
6060
my $vcxproj = $target;
61-
$vcxproj =~ s/(.*\/)?(.*)/$&\/$2.vcxproj/;
62-
$vcxproj =~ s/([^\/]*)(\/lib)\/(lib.vcxproj)/$1$2\/$1_$3/;
61+
$vcxproj =~ s/(.*\/)?(.*)/$&.proj\/$2.vcxproj/;
62+
$vcxproj =~ s/([^\/]*)(\/lib\.proj)\/(lib.vcxproj)/$1$2\/$1_$3/;
6363
$$build_structure{"$prefix${target}_VCXPROJ"} = $vcxproj;
6464

6565
my @srcs = sort(map("$rel_dir\\$_", @{$$build_structure{"$prefix${name}_SOURCES"}}));
@@ -89,7 +89,9 @@ sub createProject {
8989
$defines =~ s/>/&gt;/g;
9090
$defines =~ s/\'//g;
9191

92-
die "Could not create the directory $target for $label project!\n" unless (-d "$target" || mkdir "$target");
92+
my $dir = $vcxproj;
93+
$dir =~ s/\/[^\/]*$//;
94+
die "Could not create the directory $dir for $label project!\n" unless (-d "$dir" || mkdir "$dir");
9395

9496
open F, ">$vcxproj" or die "Could not open $vcxproj for writing!\n";
9597
binmode F, ":crlf :utf8";
@@ -236,14 +238,14 @@ EOM
236238

237239
print F << "EOM";
238240
<ItemGroup>
239-
<ProjectReference Include="$cdup\\libgit\\libgit.vcxproj">
241+
<ProjectReference Include="$cdup\\libgit.proj\\libgit.vcxproj">
240242
<Project>$uuid_libgit</Project>
241243
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
242244
</ProjectReference>
243245
EOM
244246
if (!($name =~ 'xdiff')) {
245247
print F << "EOM";
246-
<ProjectReference Include="$cdup\\xdiff\\lib\\xdiff_lib.vcxproj">
248+
<ProjectReference Include="$cdup\\xdiff\\lib.proj\\xdiff_lib.vcxproj">
247249
<Project>$uuid_xdiff_lib</Project>
248250
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
249251
</ProjectReference>
@@ -252,7 +254,7 @@ EOM
252254
if ($name =~ /(test-(line-buffer|svn-fe)|^git-remote-testsvn)\.exe$/) {
253255
my $uuid_vcs_svn_lib = $$build_structure{"LIBS_vcs-svn/lib_GUID"};
254256
print F << "EOM";
255-
<ProjectReference Include="$cdup\\vcs-svn\\lib\\vcs-svn_lib.vcxproj">
257+
<ProjectReference Include="$cdup\\vcs-svn\\lib.proj\\vcs-svn_lib.vcxproj">
256258
<Project>$uuid_vcs_svn_lib</Project>
257259
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
258260
</ProjectReference>
@@ -329,7 +331,7 @@ sub createGlueProject {
329331
my $vcxproj = $build_structure{"APPS_${appname}_VCXPROJ"};
330332
$vcxproj =~ s/\//\\/g;
331333
$appname =~ s/.*\///;
332-
print F "\"${appname}\", \"${vcxproj}\", \"${uuid}\"";
334+
print F "\"${appname}.proj\", \"${vcxproj}\", \"${uuid}\"";
333335
print F "$SLN_POST";
334336
}
335337
foreach (@libs) {
@@ -339,7 +341,7 @@ sub createGlueProject {
339341
my $vcxproj = $build_structure{"LIBS_${libname}_VCXPROJ"};
340342
$vcxproj =~ s/\//\\/g;
341343
$libname =~ s/\//_/g;
342-
print F "\"${libname}\", \"${vcxproj}\", \"${uuid}\"";
344+
print F "\"${libname}.proj\", \"${vcxproj}\", \"${uuid}\"";
343345
print F "$SLN_POST";
344346
}
345347

t/t5505-remote.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,8 @@ test_expect_success '"remote show" does not show symbolic refs' '
738738
(
739739
cd three &&
740740
git remote show origin >output &&
741-
! grep "^ *HEAD$" < output &&
742-
! grep -i stale < output
741+
! grep "^ *HEAD$" <output &&
742+
! grep -i stale <output
743743
)
744744
'
745745

@@ -929,6 +929,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
929929
(
930930
cd six &&
931931
git remote rm origin &&
932+
mkdir -p .git/branches &&
932933
echo "$origin_url#main" >.git/branches/origin &&
933934
git remote rename origin origin &&
934935
test_path_is_missing .git/branches/origin &&
@@ -943,7 +944,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
943944
(
944945
cd seven &&
945946
git remote rm origin &&
946-
echo "quux#foom" > .git/branches/origin &&
947+
mkdir -p .git/branches &&
948+
echo "quux#foom" >.git/branches/origin &&
947949
git remote rename origin origin &&
948950
test_path_is_missing .git/branches/origin &&
949951
test "$(git config remote.origin.url)" = "quux" &&

t/t5516-fetch-push.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,8 @@ test_expect_success 'fetch with branches' '
908908
mk_empty testrepo &&
909909
git branch second $the_first_commit &&
910910
git checkout second &&
911-
echo ".." > testrepo/.git/branches/branch1 &&
911+
mkdir -p testrepo/.git/branches &&
912+
echo ".." >testrepo/.git/branches/branch1 &&
912913
(
913914
cd testrepo &&
914915
git fetch branch1 &&
@@ -921,7 +922,8 @@ test_expect_success 'fetch with branches' '
921922

922923
test_expect_success 'fetch with branches containing #' '
923924
mk_empty testrepo &&
924-
echo "..#second" > testrepo/.git/branches/branch2 &&
925+
mkdir -p testrepo/.git/branches &&
926+
echo "..#second" >testrepo/.git/branches/branch2 &&
925927
(
926928
cd testrepo &&
927929
git fetch branch2 &&
@@ -935,7 +937,8 @@ test_expect_success 'fetch with branches containing #' '
935937
test_expect_success 'push with branches' '
936938
mk_empty testrepo &&
937939
git checkout second &&
938-
echo "testrepo" > .git/branches/branch1 &&
940+
mkdir -p .git/branches &&
941+
echo "testrepo" >.git/branches/branch1 &&
939942
git push branch1 &&
940943
(
941944
cd testrepo &&
@@ -947,7 +950,8 @@ test_expect_success 'push with branches' '
947950

948951
test_expect_success 'push with branches containing #' '
949952
mk_empty testrepo &&
950-
echo "testrepo#branch3" > .git/branches/branch2 &&
953+
mkdir -p .git/branches &&
954+
echo "testrepo#branch3" >.git/branches/branch2 &&
951955
git push branch2 &&
952956
(
953957
cd testrepo &&
@@ -1472,7 +1476,7 @@ EOF
14721476
git init no-thin &&
14731477
git --git-dir=no-thin/.git config receive.unpacklimit 0 &&
14741478
git push no-thin/.git refs/heads/main:refs/heads/foo &&
1475-
echo modified >> path1 &&
1479+
echo modified >>path1 &&
14761480
git commit -am modified &&
14771481
git repack -adf &&
14781482
rcvpck="git receive-pack --reject-thin-pack-for-testing" &&

0 commit comments

Comments
 (0)