Skip to content

Commit f2404b9

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 6023a1c + acaf093 commit f2404b9

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
@@ -719,7 +719,7 @@ vcxproj:
719719
# Make .vcxproj files and add them
720720
unset QUIET_GEN QUIET_BUILT_IN; \
721721
perl contrib/buildsystems/generate -g Vcxproj
722-
git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj
722+
git add -f git.sln {*,*/lib.proj,t/helper/*}/*.vcxproj
723723

724724
# Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file
725725
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
@@ -729,16 +729,16 @@ vcxproj:
729729
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
730730
done && \
731731
echo ' </Target>' && \
732-
echo '</Project>') >git/LinkOrCopyBuiltins.targets
732+
echo '</Project>') >git.proj/LinkOrCopyBuiltins.targets
733733
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
734734
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
735735
for name in $(REMOTE_CURL_ALIASES); \
736736
do \
737737
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
738738
done && \
739739
echo ' </Target>' && \
740-
echo '</Project>') >git-remote-http/LinkOrCopyRemoteHttp.targets
741-
git add -f git/LinkOrCopyBuiltins.targets git-remote-http/LinkOrCopyRemoteHttp.targets
740+
echo '</Project>') >git-remote-http.proj/LinkOrCopyRemoteHttp.targets
741+
git add -f git.proj/LinkOrCopyBuiltins.targets git-remote-http.proj/LinkOrCopyRemoteHttp.targets
742742

743743
# Add command-list.h and config-list.h
744744
$(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
@@ -734,8 +734,8 @@ test_expect_success '"remote show" does not show symbolic refs' '
734734
(
735735
cd three &&
736736
git remote show origin >output &&
737-
! grep "^ *HEAD$" < output &&
738-
! grep -i stale < output
737+
! grep "^ *HEAD$" <output &&
738+
! grep -i stale <output
739739
)
740740
'
741741

@@ -923,6 +923,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
923923
(
924924
cd six &&
925925
git remote rm origin &&
926+
mkdir -p .git/branches &&
926927
echo "$origin_url" >.git/branches/origin &&
927928
git remote rename origin origin &&
928929
test_path_is_missing .git/branches/origin &&
@@ -937,7 +938,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
937938
(
938939
cd seven &&
939940
git remote rm origin &&
940-
echo "quux#foom" > .git/branches/origin &&
941+
mkdir -p .git/branches &&
942+
echo "quux#foom" >.git/branches/origin &&
941943
git remote rename origin origin &&
942944
test_path_is_missing .git/branches/origin &&
943945
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
@@ -866,7 +866,8 @@ test_expect_success 'fetch with branches' '
866866
mk_empty testrepo &&
867867
git branch second $the_first_commit &&
868868
git checkout second &&
869-
echo ".." > testrepo/.git/branches/branch1 &&
869+
mkdir -p testrepo/.git/branches &&
870+
echo ".." >testrepo/.git/branches/branch1 &&
870871
(
871872
cd testrepo &&
872873
git fetch branch1 &&
@@ -879,7 +880,8 @@ test_expect_success 'fetch with branches' '
879880

880881
test_expect_success 'fetch with branches containing #' '
881882
mk_empty testrepo &&
882-
echo "..#second" > testrepo/.git/branches/branch2 &&
883+
mkdir -p testrepo/.git/branches &&
884+
echo "..#second" >testrepo/.git/branches/branch2 &&
883885
(
884886
cd testrepo &&
885887
git fetch branch2 &&
@@ -893,7 +895,8 @@ test_expect_success 'fetch with branches containing #' '
893895
test_expect_success 'push with branches' '
894896
mk_empty testrepo &&
895897
git checkout second &&
896-
echo "testrepo" > .git/branches/branch1 &&
898+
mkdir -p .git/branches &&
899+
echo "testrepo" >.git/branches/branch1 &&
897900
git push branch1 &&
898901
(
899902
cd testrepo &&
@@ -905,7 +908,8 @@ test_expect_success 'push with branches' '
905908

906909
test_expect_success 'push with branches containing #' '
907910
mk_empty testrepo &&
908-
echo "testrepo#branch3" > .git/branches/branch2 &&
911+
mkdir -p .git/branches &&
912+
echo "testrepo#branch3" >.git/branches/branch2 &&
909913
git push branch2 &&
910914
(
911915
cd testrepo &&
@@ -1428,7 +1432,7 @@ EOF
14281432
git init no-thin &&
14291433
git --git-dir=no-thin/.git config receive.unpacklimit 0 &&
14301434
git push no-thin/.git refs/heads/master:refs/heads/foo &&
1431-
echo modified >> path1 &&
1435+
echo modified >>path1 &&
14321436
git commit -am modified &&
14331437
git repack -adf &&
14341438
rcvpck="git receive-pack --reject-thin-pack-for-testing" &&

0 commit comments

Comments
 (0)