Skip to content
Open
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
1 change: 1 addition & 0 deletions .build/checkouts/swift-atomics
Submodule swift-atomics added at b60125
1 change: 1 addition & 0 deletions .build/checkouts/swift-collections
Submodule swift-collections added at 8c0c0a
1 change: 1 addition & 0 deletions .build/checkouts/swift-crypto
Submodule swift-crypto added at 60f13f
1 change: 1 addition & 0 deletions .build/checkouts/swift-log
Submodule swift-log added at ce592a
1 change: 1 addition & 0 deletions .build/checkouts/swift-nio
Submodule swift-nio added at 1c30f0
1 change: 1 addition & 0 deletions .build/checkouts/swift-system
Submodule swift-system added at 890830
92 changes: 92 additions & 0 deletions .build/repositories/swift-atomics-7429e549/FETCH_HEAD
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
9ea086d68314ebcf5ae8e48acbf306f6fdd6347d not-for-merge branch 'enable-swift-format' of https://github.com/apple/swift-atomics
53d9464c12660a7b971ce14351bd3f3882005ca5 not-for-merge branch 'main' of https://github.com/apple/swift-atomics
b6c32c13cd7a6cc161c4818e44c60d812e58a016 not-for-merge 'refs/pull/100/head' of https://github.com/apple/swift-atomics
9db6c56d8d7ddd561b03fa2f872d94993308aa13 not-for-merge 'refs/pull/101/head' of https://github.com/apple/swift-atomics
f10f0313d26c3eafdc0f3de15b044645bc6d8200 not-for-merge 'refs/pull/102/head' of https://github.com/apple/swift-atomics
8be2ba9c43eb5dd3b33966557d72a07028447039 not-for-merge 'refs/pull/103/head' of https://github.com/apple/swift-atomics
6ed54fa0d314006468b98ca99a0977e25e210926 not-for-merge 'refs/pull/105/head' of https://github.com/apple/swift-atomics
3431b8543fbd4ab93b02030c9480c1f62c27f5c7 not-for-merge 'refs/pull/106/head' of https://github.com/apple/swift-atomics
bd8115e0469ae1bed0406b0dc58f8e4ec70d62a0 not-for-merge 'refs/pull/109/head' of https://github.com/apple/swift-atomics
6e09389a3d013bea562c33a7c43cbc513fc5c247 not-for-merge 'refs/pull/11/head' of https://github.com/apple/swift-atomics
074c8c8feadd5d659f85826928f7448ec58b05aa not-for-merge 'refs/pull/110/head' of https://github.com/apple/swift-atomics
d0e0a4ad9da665183c246f7884355790d93a3239 not-for-merge 'refs/pull/113/head' of https://github.com/apple/swift-atomics
14e0302666a11b1b04fe754aa6a866544817a338 not-for-merge 'refs/pull/114/head' of https://github.com/apple/swift-atomics
4bd141c54f2c6ac358a2563f075d8d7849acd4da not-for-merge 'refs/pull/115/head' of https://github.com/apple/swift-atomics
c2a3bed6586db025c67dbd7c7364ac8eecd9fc1a not-for-merge 'refs/pull/117/head' of https://github.com/apple/swift-atomics
14b0f18370f5c22803e8d77390e96774bd7d7ad3 not-for-merge 'refs/pull/118/head' of https://github.com/apple/swift-atomics
040c295e8684477bb7b77b83deb1672e66c1be94 not-for-merge 'refs/pull/119/head' of https://github.com/apple/swift-atomics
7658766e6137f85ba027ac4789317b725b8dc652 not-for-merge 'refs/pull/12/head' of https://github.com/apple/swift-atomics
ee599def1ad500416a32349fa342e6a249236748 not-for-merge 'refs/pull/120/head' of https://github.com/apple/swift-atomics
19dab11ecdc01b9bac8c0127d9dadd4f4c86463d not-for-merge 'refs/pull/122/head' of https://github.com/apple/swift-atomics
7e6135863bfe7cc9deefc34dbed3f6dd1881261a not-for-merge 'refs/pull/123/head' of https://github.com/apple/swift-atomics
55a062c4a86102455fc32e1d1fec7672a165e7ca not-for-merge 'refs/pull/14/head' of https://github.com/apple/swift-atomics
47c88d732f0769bd7d4534781e172733c1cb621f not-for-merge 'refs/pull/17/head' of https://github.com/apple/swift-atomics
09ddcdd88da7a0dc6ac8a4a454b546253464d41b not-for-merge 'refs/pull/20/head' of https://github.com/apple/swift-atomics
1e43df378fdeecc3ce687672b74225ea4fc587c3 not-for-merge 'refs/pull/23/head' of https://github.com/apple/swift-atomics
7e101a5653b91a91d84ff9cf4f5303e0fa9c1938 not-for-merge 'refs/pull/24/head' of https://github.com/apple/swift-atomics
907a24f5f288b8d601cb1a5400cf2b771e7be8d2 not-for-merge 'refs/pull/25/head' of https://github.com/apple/swift-atomics
7294d12edd142b55cdf3a0f96874a7f35c9c385d not-for-merge 'refs/pull/26/head' of https://github.com/apple/swift-atomics
a2e04c3c60bf55d6ba900351068735315e617c8d not-for-merge 'refs/pull/28/head' of https://github.com/apple/swift-atomics
c711547ac1467b63d4c78cf5901b8216cdb02372 not-for-merge 'refs/pull/29/head' of https://github.com/apple/swift-atomics
f659ecc1bb836125f1cf63707104934ef905174f not-for-merge 'refs/pull/30/head' of https://github.com/apple/swift-atomics
d8a2baf4d58ac2f52adcb084d13e1d2dd0fedcf0 not-for-merge 'refs/pull/31/head' of https://github.com/apple/swift-atomics
38049a4a30d613a33bbb907b04ea91d1ce8b98bd not-for-merge 'refs/pull/32/head' of https://github.com/apple/swift-atomics
d4a3aae83bec87eee2c8545a265a910c567f0d87 not-for-merge 'refs/pull/34/head' of https://github.com/apple/swift-atomics
b58a624375564ab138ad131e040dcafe3cbd0bdd not-for-merge 'refs/pull/35/head' of https://github.com/apple/swift-atomics
1d4afa40d7b3e36195e323fc7afc7a366af62984 not-for-merge 'refs/pull/36/head' of https://github.com/apple/swift-atomics
5d07eab6feba55e06d3380880b5a4e7570f796fd not-for-merge 'refs/pull/38/head' of https://github.com/apple/swift-atomics
0e10d28288f9ad100ad46a4ec4a0ffc8732d51aa not-for-merge 'refs/pull/39/head' of https://github.com/apple/swift-atomics
4fb7f05a27138a9162cd7a1c3b8d859c91850598 not-for-merge 'refs/pull/4/head' of https://github.com/apple/swift-atomics
8e5d52727e973985c921d3d6153412881f0dabae not-for-merge 'refs/pull/40/head' of https://github.com/apple/swift-atomics
3d0a97769f0b9ef144eda096449e5c5e3aac44ca not-for-merge 'refs/pull/42/head' of https://github.com/apple/swift-atomics
2468fa3eac88d73dcdbc71402e352fd16c302d5c not-for-merge 'refs/pull/43/head' of https://github.com/apple/swift-atomics
2e0f2aa421f6e117c8fdd7d3340363e6fb45acce not-for-merge 'refs/pull/44/head' of https://github.com/apple/swift-atomics
e220ff33c3efb5dc3a3998e6375175ff5789285e not-for-merge 'refs/pull/46/head' of https://github.com/apple/swift-atomics
44bf6b59dc11d5cc2c29d796b382bcacaba42228 not-for-merge 'refs/pull/48/head' of https://github.com/apple/swift-atomics
ca87c443e8fbd7afbf21580cfedd0c1c52272197 not-for-merge 'refs/pull/49/head' of https://github.com/apple/swift-atomics
432e5bd9fe00490cb820c7a070e2f5b69ff6b2db not-for-merge 'refs/pull/5/head' of https://github.com/apple/swift-atomics
f62b0d33b4cc916ff1ec05e568e42fd133817198 not-for-merge 'refs/pull/50/head' of https://github.com/apple/swift-atomics
681881b6685f942bd74b40ecba20956f0fffc2b6 not-for-merge 'refs/pull/52/head' of https://github.com/apple/swift-atomics
907ce2a79e8ac5f3dff0fc9dc4f2fe940b56b6f4 not-for-merge 'refs/pull/58/head' of https://github.com/apple/swift-atomics
42691f8636c58ae1c4b9d83fc6349847e8ee76aa not-for-merge 'refs/pull/6/head' of https://github.com/apple/swift-atomics
3366a367c5dd0a06214a592fe279b7258e2cf0ae not-for-merge 'refs/pull/60/head' of https://github.com/apple/swift-atomics
72034b49082fd1c0d76690ad24731c2bcbc2c897 not-for-merge 'refs/pull/65/head' of https://github.com/apple/swift-atomics
3a39dbae0c8b9544684d544af66ae0d787322c37 not-for-merge 'refs/pull/67/head' of https://github.com/apple/swift-atomics
275fb6be61acbdd90982e64dd26a9a4d2442098c not-for-merge 'refs/pull/68/head' of https://github.com/apple/swift-atomics
cb7a3b2d35e7dfb501be705c657323cf301e95f5 not-for-merge 'refs/pull/69/head' of https://github.com/apple/swift-atomics
ad1fb15167f74e05ce1662625952c86a3b3d1b3c not-for-merge 'refs/pull/7/head' of https://github.com/apple/swift-atomics
0f2c36bf75400e5f5e93a0a39ad67460d834cde3 not-for-merge 'refs/pull/70/head' of https://github.com/apple/swift-atomics
8ca2dee2bf3cea31cf1f9fb96ef4c37e7ccdf86a not-for-merge 'refs/pull/71/head' of https://github.com/apple/swift-atomics
46e4e960ac6128f1e510e70f724f933385a13508 not-for-merge 'refs/pull/72/head' of https://github.com/apple/swift-atomics
79718d92d371893106eed2ca0f6c923abf994536 not-for-merge 'refs/pull/73/head' of https://github.com/apple/swift-atomics
7feb1c17912944ea989ce9d8cbfd44e8d2c071d3 not-for-merge 'refs/pull/74/head' of https://github.com/apple/swift-atomics
11a0547baa79060bcf3f881f18346f1d6a28482a not-for-merge 'refs/pull/76/head' of https://github.com/apple/swift-atomics
5a9973dc1d887b5ca4ef758ca10f043dc368dda7 not-for-merge 'refs/pull/77/head' of https://github.com/apple/swift-atomics
58a95f7984f5a0e4c2f3057bf30bd5c65cf58a47 not-for-merge 'refs/pull/78/head' of https://github.com/apple/swift-atomics
e53eff6f1727ee1713df5a5e47446004ab7754d2 not-for-merge 'refs/pull/80/head' of https://github.com/apple/swift-atomics
b1ecf114a576df36916fdc22f3c031c5a41702a7 not-for-merge 'refs/pull/81/head' of https://github.com/apple/swift-atomics
581634cdaf01db228f75ad17806669ee76d2b6df not-for-merge 'refs/pull/82/head' of https://github.com/apple/swift-atomics
8faf7003f8401420f3a8e56b87f6fd63bdec110c not-for-merge 'refs/pull/83/head' of https://github.com/apple/swift-atomics
c95665ddba7e80489bb05e8e47ecd55874f14c09 not-for-merge 'refs/pull/84/head' of https://github.com/apple/swift-atomics
a79829bbcf3f886a18698bec24c0e69ace60c528 not-for-merge 'refs/pull/85/head' of https://github.com/apple/swift-atomics
55a158b6203a5b63bdafd9ae9d2adaed66d7064b not-for-merge 'refs/pull/87/head' of https://github.com/apple/swift-atomics
cbd73b19679bea520bf37311c271a7c4d0f86b9f not-for-merge 'refs/pull/89/head' of https://github.com/apple/swift-atomics
40bd3bac4f0df421e4bf1527fcfd86a6e4a0b10a not-for-merge 'refs/pull/9/head' of https://github.com/apple/swift-atomics
1698b26243a6b654f59ceebfc2a494174bd22522 not-for-merge 'refs/pull/90/head' of https://github.com/apple/swift-atomics
41382923adf68fcfae52492bf9abd941aa8238a1 not-for-merge 'refs/pull/91/head' of https://github.com/apple/swift-atomics
5f7709d5d057ae40e002b482e88ef677cebc1443 not-for-merge 'refs/pull/93/head' of https://github.com/apple/swift-atomics
24506678e022d40a3bf98bcbd9b3d8f89a8d9b49 not-for-merge 'refs/pull/94/head' of https://github.com/apple/swift-atomics
62584d8a3da88402133394b12a52f66ea0a9c2d0 not-for-merge 'refs/pull/94/merge' of https://github.com/apple/swift-atomics
c1d2945a3805cf5efe56d0a33968285778abce50 not-for-merge 'refs/pull/95/head' of https://github.com/apple/swift-atomics
5713de15a1996d620f557575a2588f634f758a69 not-for-merge 'refs/pull/96/head' of https://github.com/apple/swift-atomics
5603f612d2874893d9877bd34013a982f23981b0 not-for-merge 'refs/pull/97/head' of https://github.com/apple/swift-atomics
b97750eb1815973a377cb85ea2f6c62374a9995d not-for-merge tag '0.0.1' of https://github.com/apple/swift-atomics
26e346cd64f6b92d4089e7fafe2f8e82f60ddb8c not-for-merge tag '0.0.2' of https://github.com/apple/swift-atomics
3e95ba32cd1b4c877f6163e8eea54afc4e63bf9f not-for-merge tag '0.0.3' of https://github.com/apple/swift-atomics
46a69523595b5142b30b20f922a1324586bdc96f not-for-merge tag '1.0.0' of https://github.com/apple/swift-atomics
59f7fbf47952b50aceb2c09d3c12e0a120e82456 not-for-merge tag '1.0.1' of https://github.com/apple/swift-atomics
919eb1d83e02121cdb434c7bfc1f0c66ef17febe not-for-merge tag '1.0.2' of https://github.com/apple/swift-atomics
ff3d2212b6b093db7f177d0855adbc4ef9c5f036 not-for-merge tag '1.0.3' of https://github.com/apple/swift-atomics
6c89474e62719ddcc1e9614989fff2f68208fe10 not-for-merge tag '1.1.0' of https://github.com/apple/swift-atomics
cd142fd2f64be2100422d658e7411e39489da985 not-for-merge tag '1.2.0' of https://github.com/apple/swift-atomics
b601256eab081c0f92f059e12818ac1d4f178ff7 not-for-merge tag '1.3.0' of https://github.com/apple/swift-atomics
1 change: 1 addition & 0 deletions .build/repositories/swift-atomics-7429e549/HEAD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref: refs/heads/main
13 changes: 13 additions & 0 deletions .build/repositories/swift-atomics-7429e549/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[core]
repositoryformatversion = 0
filemode = true
bare = true
ignorecase = true
precomposeunicode = true
symlinks = true
fsmonitor = false
longpaths = true
[remote "origin"]
url = https://github.com/apple/swift-atomics.git
fetch = +refs/*:refs/*
mirror = true
1 change: 1 addition & 0 deletions .build/repositories/swift-atomics-7429e549/description
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".

. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:
24 changes: 24 additions & 0 deletions .build/repositories/swift-atomics-7429e549/hooks/commit-msg.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".

# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"

# This example catches duplicate Signed-off-by lines.

test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
#!/usr/bin/perl

use strict;
use warnings;
use IPC::Open2;

# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 2) and last update token
# formatted as a string and outputs to stdout a new update token and
# all files that have been modified since the update token. Paths must
# be relative to the root of the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $last_update_token) = @ARGV;

# Uncomment for debugging
# print STDERR "$0 $version $last_update_token\n";

# Check the hook interface version
if ($version ne 2) {
die "Unsupported query-fsmonitor hook version '$version'.\n" .
"Falling back to scanning...\n";
}

my $git_work_tree = get_working_dir();

my $retry = 1;

my $json_pkg;
eval {
require JSON::XS;
$json_pkg = "JSON::XS";
1;
} or do {
require JSON::PP;
$json_pkg = "JSON::PP";
};

launch_watchman();

sub launch_watchman {
my $o = watchman_query();
if (is_work_tree_watched($o)) {
output_result($o->{clock}, @{$o->{files}});
}
}

sub output_result {
my ($clockid, @files) = @_;

# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# binmode $fh, ":utf8";
# print $fh "$clockid\n@files\n";
# close $fh;

binmode STDOUT, ":utf8";
print $clockid;
print "\0";
local $, = "\0";
print @files;
}

sub watchman_clock {
my $response = qx/watchman clock "$git_work_tree"/;
die "Failed to get clock id on '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;

return $json_pkg->new->utf8->decode($response);
}

sub watchman_query {
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
or die "open2() failed: $!\n" .
"Falling back to scanning...\n";

# In the query expression below we're asking for names of files that
# changed since $last_update_token but not from the .git folder.
#
# To accomplish this, we're using the "since" generator to use the
# recency index to select candidate nodes and "fields" to limit the
# output to file names only. Then we're using the "expression" term to
# further constrain the results.
my $last_update_line = "";
if (substr($last_update_token, 0, 1) eq "c") {
$last_update_token = "\"$last_update_token\"";
$last_update_line = qq[\n"since": $last_update_token,];
}
my $query = <<" END";
["query", "$git_work_tree", {$last_update_line
"fields": ["name"],
"expression": ["not", ["dirname", ".git"]]
}]
END

# Uncomment for debugging the watchman query
# open (my $fh, ">", ".git/watchman-query.json");
# print $fh $query;
# close $fh;

print CHLD_IN $query;
close CHLD_IN;
my $response = do {local $/; <CHLD_OUT>};

# Uncomment for debugging the watch response
# open ($fh, ">", ".git/watchman-response.json");
# print $fh $response;
# close $fh;

die "Watchman: command returned no output.\n" .
"Falling back to scanning...\n" if $response eq "";
die "Watchman: command returned invalid output: $response\n" .
"Falling back to scanning...\n" unless $response =~ /^\{/;

return $json_pkg->new->utf8->decode($response);
}

sub is_work_tree_watched {
my ($output) = @_;
my $error = $output->{error};
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
$retry--;
my $response = qx/watchman watch "$git_work_tree"/;
die "Failed to make watchman watch '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
$output = $json_pkg->new->utf8->decode($response);
$error = $output->{error};
die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;

# Uncomment for debugging watchman output
# open (my $fh, ">", ".git/watchman-output.out");
# close $fh;

# Watchman will always return all files on the first query so
# return the fast "everything is dirty" flag to git and do the
# Watchman query just to get it over with now so we won't pay
# the cost in git to look up each individual file.
my $o = watchman_clock();
$error = $output->{error};

die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;

output_result($o->{clock}, ("/"));
$last_update_token = $o->{clock};

eval { launch_watchman() };
return 0;
}

die "Watchman: $error.\n" .
"Falling back to scanning...\n" if $error;

return 1;
}

sub get_working_dir {
my $working_dir;
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
$working_dir = Win32::GetCwd();
$working_dir =~ tr/\\/\//;
} else {
require Cwd;
$working_dir = Cwd::cwd();
}

return $working_dir;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".

exec git update-server-info
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".

. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:
Loading
Loading