Skip to content

Commit b254ad3

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
ci: avoid d/f conflict in vs/master
2 parents 797414b + c0a99ec commit b254ad3

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
@@ -775,7 +775,7 @@ vcxproj:
775775
# Make .vcxproj files and add them
776776
unset QUIET_GEN QUIET_BUILT_IN; \
777777
perl contrib/buildsystems/generate -g Vcxproj
778-
git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj
778+
git add -f git.sln {*,*/lib.proj,t/helper/*}/*.vcxproj
779779

780780
# Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file
781781
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
@@ -785,16 +785,16 @@ vcxproj:
785785
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
786786
done && \
787787
echo ' </Target>' && \
788-
echo '</Project>') >git/LinkOrCopyBuiltins.targets
788+
echo '</Project>') >git.proj/LinkOrCopyBuiltins.targets
789789
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
790790
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
791791
for name in $(REMOTE_CURL_ALIASES); \
792792
do \
793793
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
794794
done && \
795795
echo ' </Target>' && \
796-
echo '</Project>') >git-remote-http/LinkOrCopyRemoteHttp.targets
797-
git add -f git/LinkOrCopyBuiltins.targets git-remote-http/LinkOrCopyRemoteHttp.targets
796+
echo '</Project>') >git-remote-http.proj/LinkOrCopyRemoteHttp.targets
797+
git add -f git.proj/LinkOrCopyBuiltins.targets git-remote-http.proj/LinkOrCopyRemoteHttp.targets
798798

799799
# Add command-list.h and config-list.h
800800
$(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"}}));
@@ -88,7 +88,9 @@ sub createProject {
8888
$defines =~ s/>/&gt;/g;
8989
$defines =~ s/\'//g;
9090

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

9395
open F, ">$vcxproj" or die "Could not open $vcxproj for writing!\n";
9496
binmode F, ":crlf :utf8";
@@ -235,14 +237,14 @@ EOM
235237

236238
print F << "EOM";
237239
<ItemGroup>
238-
<ProjectReference Include="$cdup\\libgit\\libgit.vcxproj">
240+
<ProjectReference Include="$cdup\\libgit.proj\\libgit.vcxproj">
239241
<Project>$uuid_libgit</Project>
240242
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
241243
</ProjectReference>
242244
EOM
243245
if (!($name =~ 'xdiff')) {
244246
print F << "EOM";
245-
<ProjectReference Include="$cdup\\xdiff\\lib\\xdiff_lib.vcxproj">
247+
<ProjectReference Include="$cdup\\xdiff\\lib.proj\\xdiff_lib.vcxproj">
246248
<Project>$uuid_xdiff_lib</Project>
247249
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
248250
</ProjectReference>
@@ -251,7 +253,7 @@ EOM
251253
if ($name =~ /(test-(line-buffer|svn-fe)|^git-remote-testsvn)\.exe$/) {
252254
my $uuid_vcs_svn_lib = $$build_structure{"LIBS_vcs-svn/lib_GUID"};
253255
print F << "EOM";
254-
<ProjectReference Include="$cdup\\vcs-svn\\lib\\vcs-svn_lib.vcxproj">
256+
<ProjectReference Include="$cdup\\vcs-svn\\lib.proj\\vcs-svn_lib.vcxproj">
255257
<Project>$uuid_vcs_svn_lib</Project>
256258
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
257259
</ProjectReference>
@@ -328,7 +330,7 @@ sub createGlueProject {
328330
my $vcxproj = $build_structure{"APPS_${appname}_VCXPROJ"};
329331
$vcxproj =~ s/\//\\/g;
330332
$appname =~ s/.*\///;
331-
print F "\"${appname}\", \"${vcxproj}\", \"${uuid}\"";
333+
print F "\"${appname}.proj\", \"${vcxproj}\", \"${uuid}\"";
332334
print F "$SLN_POST";
333335
}
334336
foreach (@libs) {
@@ -338,7 +340,7 @@ sub createGlueProject {
338340
my $vcxproj = $build_structure{"LIBS_${libname}_VCXPROJ"};
339341
$vcxproj =~ s/\//\\/g;
340342
$libname =~ s/\//_/g;
341-
print F "\"${libname}\", \"${vcxproj}\", \"${uuid}\"";
343+
print F "\"${libname}.proj\", \"${vcxproj}\", \"${uuid}\"";
342344
print F "$SLN_POST";
343345
}
344346

t/t5505-remote.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -721,8 +721,8 @@ test_expect_success '"remote show" does not show symbolic refs' '
721721
(
722722
cd three &&
723723
git remote show origin >output &&
724-
! grep "^ *HEAD$" < output &&
725-
! grep -i stale < output
724+
! grep "^ *HEAD$" <output &&
725+
! grep -i stale <output
726726
)
727727
'
728728

@@ -910,6 +910,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
910910
(
911911
cd six &&
912912
git remote rm origin &&
913+
mkdir -p .git/branches &&
913914
echo "$origin_url" >.git/branches/origin &&
914915
git remote rename origin origin &&
915916
test_path_is_missing .git/branches/origin &&
@@ -924,7 +925,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
924925
(
925926
cd seven &&
926927
git remote rm origin &&
927-
echo "quux#foom" > .git/branches/origin &&
928+
mkdir -p .git/branches &&
929+
echo "quux#foom" >.git/branches/origin &&
928930
git remote rename origin origin &&
929931
test_path_is_missing .git/branches/origin &&
930932
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)