Skip to content

Commit abff173

Browse files
committed
Update bundled git and improve tests
1 parent 1ba5b64 commit abff173

408 files changed

Lines changed: 70955 additions & 1404 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
xcuserdata/
66
DerivedData/
77
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8+
/tools/git-bundle/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ Embedded git bundle
9898

9999
- `GitEnvironment` will prefer the embedded instance when `Style.embed` is selected or when `Style.auto` finds it.
100100
- Agents and tests should not modify files under the bundle. Use `GitEnvironment.Style.custom(URL)` to point to an alternate git distribution.
101+
- To generate an updated bundle, run `tools/update-git-bundle.sh`. It writes to `tools/git-bundle/git-instance.bundle` by default.
102+
- Review the generated bundle and replace `Sources/SwiftGit/Resource/git-instance.bundle` if needed.
101103

102104
Tests and integration tests
103105
- Tests live under `Tests/SwiftGitTests/`.

Sources/SwiftGit/Custom/commands/git-commands-status.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public extension StatusOptions {
238238
*/
239239
/// ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)
240240
static func ignoreSubmodules(_ when: IgnoreSubmodules) -> StatusOptions {
241-
.init(stringLiteral: "--ignored=\(when.rawValue)")
241+
.init(stringLiteral: "--ignore-submodules=\(when.rawValue)")
242242
}
243243

244244
/**
-1.67 MB
Binary file not shown.
Binary file not shown.

Sources/SwiftGit/Resource/git-instance.bundle/bin/git-cvsserver

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/perl
22

3-
use lib (split(/:/, $ENV{GITPERLLIB} || '/usr/local/git/share/perl5'));
3+
use lib (split(/:/, $ENV{GITPERLLIB} || '/var/folders/rk/yj_4tlx92sz7t5k73kxppyl80000gn/T//git-bundle.liZNhZ/stage/share/perl5'));
44

55
####
66
#### This application is a CVS emulation layer for git.
@@ -17,7 +17,7 @@ use lib (split(/:/, $ENV{GITPERLLIB} || '/usr/local/git/share/perl5'));
1717
####
1818
####
1919

20-
use 5.008001;
20+
require v5.26;
2121
use strict;
2222
use warnings;
2323
use bytes;
@@ -28,7 +28,7 @@ use File::Path qw/rmtree/;
2828
use File::Basename;
2929
use Getopt::Long qw(:config require_order no_ignore_case);
3030

31-
my $VERSION = '2.45.2';
31+
my $VERSION = '2.53.0';
3232

3333
my $log = GITCVS::log->new();
3434
my $cfg;
@@ -4988,13 +4988,13 @@ sub gethistorydense
49884988
return $result;
49894989
}
49904990

4991-
=head2 escapeRefName
4991+
=head2 unescapeRefName
49924992
4993-
Apply an escape mechanism to compensate for characters that
4993+
Undo an escape mechanism to compensate for characters that
49944994
git ref names can have that CVS tags can not.
49954995
49964996
=cut
4997-
sub escapeRefName
4997+
sub unescapeRefName
49984998
{
49994999
my($self,$refName)=@_;
50005000

@@ -5011,27 +5011,6 @@ sub escapeRefName
50115011
# = "_-xx-" Where "xx" is the hexadecimal representation of the
50125012
# desired ASCII character byte. (for anything else)
50135013

5014-
if(! $refName=~/^[1-9][0-9]*(\.[1-9][0-9]*)*$/)
5015-
{
5016-
$refName=~s/_-/_-u--/g;
5017-
$refName=~s/\./_-p-/g;
5018-
$refName=~s%/%_-s-%g;
5019-
$refName=~s/[^-_a-zA-Z0-9]/sprintf("_-%02x-",$1)/eg;
5020-
}
5021-
}
5022-
5023-
=head2 unescapeRefName
5024-
5025-
Undo an escape mechanism to compensate for characters that
5026-
git ref names can have that CVS tags can not.
5027-
5028-
=cut
5029-
sub unescapeRefName
5030-
{
5031-
my($self,$refName)=@_;
5032-
5033-
# see escapeRefName() for description of escape mechanism.
5034-
50355014
$refName=~s/_-([spu]|[0-9a-f][0-9a-f])-/unescapeRefNameChar($1)/eg;
50365015

50375016
# allowed tag names

Sources/SwiftGit/Resource/git-instance.bundle/bin/git-receive-pack

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.
-1.11 MB
Binary file not shown.

Sources/SwiftGit/Resource/git-instance.bundle/bin/git-upload-archive

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)