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

ci: avoid d/f conflict in vs/master #2618

Merged
merged 3 commits into from
May 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config.mak.uname
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ vcxproj:
# Make .vcxproj files and add them
unset QUIET_GEN QUIET_BUILT_IN; \
perl contrib/buildsystems/generate -g Vcxproj
git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj
git add -f git.sln {*,*/lib.proj,t/helper/*}/*.vcxproj

# Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
Expand All @@ -785,16 +785,16 @@ vcxproj:
echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
done && \
echo ' </Target>' && \
echo '</Project>') >git/LinkOrCopyBuiltins.targets
echo '</Project>') >git.proj/LinkOrCopyBuiltins.targets
(echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \
echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \
for name in $(REMOTE_CURL_ALIASES); \
do \
echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \
done && \
echo ' </Target>' && \
echo '</Project>') >git-remote-http/LinkOrCopyRemoteHttp.targets
git add -f git/LinkOrCopyBuiltins.targets git-remote-http/LinkOrCopyRemoteHttp.targets
echo '</Project>') >git-remote-http.proj/LinkOrCopyRemoteHttp.targets
git add -f git.proj/LinkOrCopyBuiltins.targets git-remote-http.proj/LinkOrCopyRemoteHttp.targets

# Add command-list.h
$(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 command-list.h
Expand Down
18 changes: 10 additions & 8 deletions contrib/buildsystems/Generators/Vcxproj.pm
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ sub createProject {
my $uuid = generate_guid($name);
$$build_structure{"$prefix${target}_GUID"} = $uuid;
my $vcxproj = $target;
$vcxproj =~ s/(.*\/)?(.*)/$&\/$2.vcxproj/;
$vcxproj =~ s/([^\/]*)(\/lib)\/(lib.vcxproj)/$1$2\/$1_$3/;
$vcxproj =~ s/(.*\/)?(.*)/$&.proj\/$2.vcxproj/;
$vcxproj =~ s/([^\/]*)(\/lib\.proj)\/(lib.vcxproj)/$1$2\/$1_$3/;
$$build_structure{"$prefix${target}_VCXPROJ"} = $vcxproj;

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

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

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

print F << "EOM";
<ItemGroup>
<ProjectReference Include="$cdup\\libgit\\libgit.vcxproj">
<ProjectReference Include="$cdup\\libgit.proj\\libgit.vcxproj">
<Project>$uuid_libgit</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
EOM
if (!($name =~ 'xdiff')) {
print F << "EOM";
<ProjectReference Include="$cdup\\xdiff\\lib\\xdiff_lib.vcxproj">
<ProjectReference Include="$cdup\\xdiff\\lib.proj\\xdiff_lib.vcxproj">
<Project>$uuid_xdiff_lib</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
Expand All @@ -251,7 +253,7 @@ EOM
if ($name =~ /(test-(line-buffer|svn-fe)|^git-remote-testsvn)\.exe$/) {
my $uuid_vcs_svn_lib = $$build_structure{"LIBS_vcs-svn/lib_GUID"};
print F << "EOM";
<ProjectReference Include="$cdup\\vcs-svn\\lib\\vcs-svn_lib.vcxproj">
<ProjectReference Include="$cdup\\vcs-svn\\lib.proj\\vcs-svn_lib.vcxproj">
<Project>$uuid_vcs_svn_lib</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
Expand Down Expand Up @@ -328,7 +330,7 @@ sub createGlueProject {
my $vcxproj = $build_structure{"APPS_${appname}_VCXPROJ"};
$vcxproj =~ s/\//\\/g;
$appname =~ s/.*\///;
print F "\"${appname}\", \"${vcxproj}\", \"${uuid}\"";
print F "\"${appname}.proj\", \"${vcxproj}\", \"${uuid}\"";
print F "$SLN_POST";
}
foreach (@libs) {
Expand All @@ -338,7 +340,7 @@ sub createGlueProject {
my $vcxproj = $build_structure{"LIBS_${libname}_VCXPROJ"};
$vcxproj =~ s/\//\\/g;
$libname =~ s/\//_/g;
print F "\"${libname}\", \"${vcxproj}\", \"${uuid}\"";
print F "\"${libname}.proj\", \"${vcxproj}\", \"${uuid}\"";
print F "$SLN_POST";
}

Expand Down
8 changes: 5 additions & 3 deletions t/t5505-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,8 @@ test_expect_success '"remote show" does not show symbolic refs' '
(
cd three &&
git remote show origin >output &&
! grep "^ *HEAD$" < output &&
! grep -i stale < output
! grep "^ *HEAD$" <output &&
! grep -i stale <output
)
'

Expand Down Expand Up @@ -910,6 +910,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
(
cd six &&
git remote rm origin &&
mkdir -p .git/branches &&
echo "$origin_url" >.git/branches/origin &&
git remote rename origin origin &&
test_path_is_missing .git/branches/origin &&
Expand All @@ -924,7 +925,8 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
(
cd seven &&
git remote rm origin &&
echo "quux#foom" > .git/branches/origin &&
dscho marked this conversation as resolved.
Show resolved Hide resolved
mkdir -p .git/branches &&
echo "quux#foom" >.git/branches/origin &&
git remote rename origin origin &&
test_path_is_missing .git/branches/origin &&
test "$(git config remote.origin.url)" = "quux" &&
Expand Down
14 changes: 9 additions & 5 deletions t/t5516-fetch-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,8 @@ test_expect_success 'fetch with branches' '
mk_empty testrepo &&
git branch second $the_first_commit &&
git checkout second &&
echo ".." > testrepo/.git/branches/branch1 &&
mkdir -p testrepo/.git/branches &&
echo ".." >testrepo/.git/branches/branch1 &&
(
cd testrepo &&
git fetch branch1 &&
Expand All @@ -879,7 +880,8 @@ test_expect_success 'fetch with branches' '

test_expect_success 'fetch with branches containing #' '
mk_empty testrepo &&
echo "..#second" > testrepo/.git/branches/branch2 &&
mkdir -p testrepo/.git/branches &&
echo "..#second" >testrepo/.git/branches/branch2 &&
(
cd testrepo &&
git fetch branch2 &&
Expand All @@ -893,7 +895,8 @@ test_expect_success 'fetch with branches containing #' '
test_expect_success 'push with branches' '
mk_empty testrepo &&
git checkout second &&
echo "testrepo" > .git/branches/branch1 &&
mkdir -p .git/branches &&
echo "testrepo" >.git/branches/branch1 &&
git push branch1 &&
(
cd testrepo &&
Expand All @@ -905,7 +908,8 @@ test_expect_success 'push with branches' '

test_expect_success 'push with branches containing #' '
mk_empty testrepo &&
echo "testrepo#branch3" > .git/branches/branch2 &&
dscho marked this conversation as resolved.
Show resolved Hide resolved
mkdir -p .git/branches &&
echo "testrepo#branch3" >.git/branches/branch2 &&
git push branch2 &&
(
cd testrepo &&
Expand Down Expand Up @@ -1427,7 +1431,7 @@ EOF
git init no-thin &&
git --git-dir=no-thin/.git config receive.unpacklimit 0 &&
git push no-thin/.git refs/heads/master:refs/heads/foo &&
echo modified >> path1 &&
echo modified >>path1 &&
git commit -am modified &&
git repack -adf &&
rcvpck="git receive-pack --reject-thin-pack-for-testing" &&
Expand Down