Manos Chorianopoulos

version 2.2.0 - SPM Implementation

Showing 1000 changed files with 1891 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

No preview for this file type
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
[core]
repositoryformatversion = 0
filemode = true
bare = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://github.com/yeahdongcn/RSBarcodes_Swift
fetch = +refs/*:refs/*
mirror = true
Unnamed repository; edit this file 'description' to name the repository.
#!/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+"$@"}
:
#!/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
}
#!/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;
}
#!/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
#!/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+"$@"}
:
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. 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-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git merge" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message to
# stderr if it wants to stop the merge commit.
#
# To enable this hook, rename this file to "pre-merge-commit".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit"
:
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
while read local_ref local_oid remote_ref remote_oid
do
if test "$local_oid" = "$zero"
then
# Handle delete
:
else
if test "$remote_oid" = "$zero"
then
# New branch, examine all commits
range="$local_oid"
else
# Update to existing branch, examine new commits
range="$remote_oid..$local_oid"
fi
# Check for WIP commit
commit=$(git rev-list -n 1 --grep '^WIP' "$range")
if test -n "$commit"
then
echo >&2 "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up to date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
else
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/\n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/\n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]\n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / \ /
/ / / b---b C \ /
/ / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
echoback=*)
echo "echo from the pre-receive-hook: ${value#*=}" >&2
;;
reject)
exit 1
esac
i=$((i + 1))
done
fi
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi
#!/bin/sh
# An example hook script to update a checked-out tree on a git push.
#
# This hook is invoked by git-receive-pack(1) when it reacts to git
# push and updates reference(s) in its repository, and when the push
# tries to update the branch that is currently checked out and the
# receive.denyCurrentBranch configuration variable is set to
# updateInstead.
#
# By default, such a push is refused if the working tree and the index
# of the remote repository has any difference from the currently
# checked out commit; when both the working tree and the index match
# the current commit, they are updated to match the newly pushed tip
# of the branch. This hook is to be used to override the default
# behaviour; however the code below reimplements the default behaviour
# as a starting point for convenient modification.
#
# The hook receives the commit with which the tip of the current
# branch is going to be updated:
commit=$1
# It can exit with a non-zero status to refuse the push (when it does
# so, it must not modify the index or the working tree).
die () {
echo >&2 "$*"
exit 1
}
# Or it can make any necessary changes to the working tree and to the
# index to bring them to the desired state when the tip of the current
# branch is updated to the new commit, and exit with a zero status.
#
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
# in order to emulate git fetch that is run in the reverse direction
# with git push, as the two-tree form of git read-tree -u -m is
# essentially the same as git switch or git checkout that switches
# branches while keeping the local changes in the working tree that do
# not interfere with the difference between the branches.
# The below is a more-or-less exact translation to shell of the C code
# for the default behaviour for git's push-to-checkout hook defined in
# the push_to_deploy() function in builtin/receive-pack.c.
#
# Note that the hook will be executed from the repository directory,
# not from the working tree, so if you want to perform operations on
# the working tree, you will have to adapt your code accordingly, e.g.
# by adding "cd .." or using relative paths.
if ! git update-index -q --ignore-submodules --refresh
then
die "Up-to-date check failed"
fi
if ! git diff-files --quiet --ignore-submodules --
then
die "Working directory has unstaged changes"
fi
# This is a rough translation of:
#
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
if git cat-file -e HEAD 2>/dev/null
then
head=HEAD
else
head=$(git hash-object -t tree --stdin </dev/null)
fi
if ! git diff-index --quiet --cached --ignore-submodules $head --
then
die "Working directory has staged changes"
fi
if ! git read-tree -u -m "$commit"
then
die "Could not update working tree to new HEAD"
fi
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --type=bool hooks.allowunannotated)
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
echo "*** Creating a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
# delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
# pack-refs with: peeled fully-peeled sorted
21b726e130241a804c72afad4d1c0b0d7d9fd706 refs/heads/Swift-2.3
aa0be8b53946ba2a1044cd9c5f590f82708e9578 refs/heads/Swift-3.0
fde53070cdf5c5fde92697d33512161486cc37b9 refs/heads/master
19ec93187ac7e4d89d73e1dc9d4803143cb9e4b0 refs/pull/101/head
e969d0470f9059edd55f84d3ea4b016c6953f284 refs/pull/102/head
44948e94bed7dad0be19f8b594e4c9112e539124 refs/pull/102/merge
3a0e9b07ad5e6e8c429f8e444904d98de26807b8 refs/pull/103/head
fee5860c7ba84cc72b086d55544f042dbe6e9c99 refs/pull/104/head
e366f99be724eff982886ab640529bd93f78375b refs/pull/107/head
20692d8c8e881b73f72a85263c615f03da08933c refs/pull/109/head
e41b8679d9c1473bf70391ae29312aa13924b2b8 refs/pull/111/head
c36c8e90faf1f0fc9c9f03bd9878229174210e4e refs/pull/112/head
14be9ff495114d595ff609e7c411390118a9099b refs/pull/113/head
3fb32a1fabe693565a0f5690db332492250a4929 refs/pull/115/head
d270bc04ff2d84e8f6374cd5c59239cbd0632013 refs/pull/115/merge
bd835a9efc690ce27752b3c0c2d5fe22e29a814e refs/pull/12/head
4eccb8a653869d5fd6002814a790bc764c602c10 refs/pull/120/head
94b51ed6db9c445efc4009b47e95930f85cf5d26 refs/pull/120/merge
c1d7d08e1452a98725f29c515bbb6208a64fad67 refs/pull/121/head
d8c1d83657142a679400ab66873a2d1587ec7b60 refs/pull/124/head
0443c04916d18c004c1bd72ab3d414645dc4035e refs/pull/126/head
e5ba3d08acd80225d5afa91a250e662fa2f4fff9 refs/pull/127/head
55fb0d7c37c0f035a9e3661fac96ea34e54803d5 refs/pull/128/head
ae5e952ff535d3ec5aa1fbe288c39fd6f4be2471 refs/pull/134/head
c61bd75f3338960207dedcd657ff726889bee8ce refs/pull/135/head
0ab6f3bd20374d961e6d154883617f3dee0e84f0 refs/pull/137/head
ad87172f602fdc0f0184490caf8361c4179b8602 refs/pull/140/head
cb7cd1feb13543b9577dac5717f901c803ffb9db refs/pull/145/head
aa7854967b3b2f850bfe002f1fbeb2cc73235e38 refs/pull/146/head
60ec718f6b33b3762176a8d8aedd39753f650fcf refs/pull/152/head
ede410f6e493d9b81ec1540e45a9fb0ba80e62a4 refs/pull/155/head
23fbf131c4bc947e03cf0cd6cafb0c79f26be9df refs/pull/155/merge
e87854d5ac1e9b302b83597ae41186e578992b5d refs/pull/159/head
33550ecc1c94eb6b6872dd7580530b97642fa5be refs/pull/159/merge
ffb46920cd5e90891f6f37d26125ded73e542222 refs/pull/17/head
9fd32eda55247d9e36dfce1def41729e0bbc96ee refs/pull/19/head
1375065d97e7d520d6c429efdf1b8945ac05685c refs/pull/20/head
131e644ade8a818d2d4fed8c4394f2c27270fd36 refs/pull/27/head
5b844e8b9cf1b0b52d711f32bc11ba43a0beef95 refs/pull/29/head
e16066f446980b0ac0ac3f3efb265742f3950697 refs/pull/3/head
a846ac33c3ae489a92c772fe11723fd83ba541e0 refs/pull/3/merge
0ae0cd3b2591d916ba0eda0dfb5fd99b17eefe44 refs/pull/31/head
0c96232acb14821ca95cb3f450f93e36089a3194 refs/pull/31/merge
d3c89b0231976afa5be74a424952dae4934b1246 refs/pull/32/head
5bd553d72c442d3f605d4aeb06263c15a6844499 refs/pull/36/head
835ecdbc9e65dfb0f4406451115223a1e9f8fd50 refs/pull/42/head
7922332d8cd445dd5c57003f4fee3fa1aeb74150 refs/pull/47/head
80cad6ca9c5e01f6bf7ef49ae53133bc6ee30c2c refs/pull/50/head
7d51cf5db44098cc9aa0e9056eb206bd31db514c refs/pull/52/head
2c2532f50265b71bbd50527480f76b558d561836 refs/pull/55/head
4fd56a9edf5f5333aa81893223c4223dd7bf687d refs/pull/59/head
bb06163748021404f51205ed7e65c4ecfd1189d8 refs/pull/62/head
366e2662e6629192f9cdeec02ec4ae7c637bd4ac refs/pull/62/merge
2f356bcbce90aa4a97a0cbfc907b4be005c7946b refs/pull/63/head
2fa968f3b4cb46c67e24bf75c9bbefd1e1553789 refs/pull/63/merge
9404a387664cd782f1fcc3a1a81362fedecaf259 refs/pull/64/head
5905554be374626950397274e9298be14093ff7a refs/pull/64/merge
42dfe496539efc18fc611a08e3c27f51a558c520 refs/pull/66/head
7a8079fe97e659cee5808adde4fd3f471f59876e refs/pull/69/head
aa0be8b53946ba2a1044cd9c5f590f82708e9578 refs/pull/70/head
568e6bb3efe04d7db945cda4b104154143301636 refs/pull/78/head
9ad85cc8115f9cdb174e734317598a72a96a0382 refs/pull/82/head
ac71ca0da8ce224b28faaf57ba03f9a6226cd645 refs/pull/83/head
a785491667ec4b7daf2a065cc9dcde3249e94365 refs/pull/84/head
49c0a1c4ba52ca6b756a11c3451e25e8f5f0b5d0 refs/pull/86/head
da8c047b9938d43e526df43e9ed3c5b230504847 refs/pull/89/head
8024247e262fa39286323559f2396fd6facd8cd1 refs/pull/94/head
239eb3952c8c31b7c904dd367762ff14e90dbbc7 refs/pull/99/head
a72f9ca9f3a68d95a7d41b0b84300341762a85a6 refs/tags/0.0.1
^00ce239f8d3eb557ddcbd8aa1452c337b257b8a0
d1987dccb2685c96e25dd6c89fda05fd5f640903 refs/tags/0.0.2
^c217a63a341d4b7342e7397f72659b59a9bb763a
90b9af64ca786a111a6065b94d657ef286ec1b66 refs/tags/0.0.3
^606868c385eebd1b67c285eb9d50c78edbfc5332
5a910a73fdec86b8ad6c3f0cb8500918954088b8 refs/tags/0.0.4
^bfeb7e182a7ab4b25c003c5433962a9e35483a33
c0081046c91bceeb4607b367a1cf78a9f8b009af refs/tags/0.0.5
^1b9ac46f5c3d36e03baf98b258449c246ea1b6d6
784586dcb61ca434e9a9d4994dd317fafcf346a8 refs/tags/0.0.6
^55058b5967af206ecb7e83f2e093dd5cfe7307cf
75ce11b3ea3532b01cd1dd3df7189652a8a3e9a3 refs/tags/0.0.7
^e000eefda3bab533a4cd03a36de0d874dfde9c1b
fc863688860338fdd0a72c8702b9f7d2ca7f31a2 refs/tags/0.0.8
^5c8609a0b7a6a431313372ea7e3f3466cd8fd2f4
9faf0b83b87b39041f0ba02f7c0fce74a374d6d5 refs/tags/0.1.0
^dca6269033015a30295f02e00ea193c545cd95dc
84c6bb53ed04ffee25a2afffbe5f022048d78322 refs/tags/0.1.4
^60cc1a9852b17a2d5e587a766f9734d8f3f916d1
f74aa68a6ddceb133b8f5753b3faf8dc52735349 refs/tags/0.1.5
^19453fa68fcda2273f61294a7cb8e04b13c8d36b
cb0aa1f4de05758b7d89e4cecc80b32bcc78c7a3 refs/tags/0.1.6
^c4eb9c5d2510cf231f02b1491831b0d102896c7c
6240c2054e83ebd3d90041aab2f514833f0b8d58 refs/tags/0.1.7
^b212dc649fbab8be89178f2b0491fe0ded806934
696f3669a4ff3b6f7c7ace37aea38d4397327e80 refs/tags/0.1.8
^426594eeb7718f5c0afcb6865e37f2a19395ba5e
3baa430a546faa3e59e69b557e36b9a03c623663 refs/tags/0.1.9
^0f5c7b2f4e8cf9febc62844dcc6241e2d0fb2cd4
71486b3af3308c542e0eabe23039e87ff78cacf0 refs/tags/2.3
^efd644b20ebaa36701bc96d69f1f837132344d33
54e801d6b8a7a32279ab5ffc727f159acbcbc575 refs/tags/2.3.1
^8f13828c8f79f25c2f04bf689c4427524ab82db9
66daeba9b5389be84d463c5a2be866bdcc843578 refs/tags/2.3.2
^7c88a7f4acea210e66f6f325ddd7a18385277cb4
54b859e2dfd2e6f6e748df391ecc46b5d0289716 refs/tags/2.3.3
^21b726e130241a804c72afad4d1c0b0d7d9fd706
92609b2e4c8c92c970b7bdf27f09d7e743c44f86 refs/tags/3.0
^5b15abd39ef4c4fffd3da30fcd4dd65d8d3aa5f4
973799ceb3b1787ba5de99717b34a3a91cb391bd refs/tags/3.0.1
^4e4f7b0720aa8a6db1722e389ec45b5bce05063d
14fbaf445edd4f9a7ec8ae147bb8d017cc04455b refs/tags/3.0.2
^3609941f1e085766bcf7fc59e4e60e0d494ca136
3954fb40d2d1efdb520c09fb7cb79b42e3c24a69 refs/tags/3.0.3
^5dfc25c26426cee02b318c7604f381153c1e78e2
8bbb75fab51bffc5f128c3d069b21e13b5f4fcad refs/tags/4.0.0
^02e5341bcb270cf1ba932d583e7911f6df79dbef
598f5ea762399853a0bf92927be54c60f0daaebb refs/tags/4.2.0
^ccaacedbddf20a0562867a175045e82e43e48afc
17b4ec9ec23ff4407eef1c4d2ad7d0de695e28f2 refs/tags/4.2.1
^27933d501fc26fa9a9d58b262c3c69c657459ff1
5487616ca255f035624f27386d9953373a155973 refs/tags/5.0.0
^39c3d8c6ee6eac332620b6cab61e166771ddbe04
1f68053c1a625ac77ba3f0b02b89172613473452 refs/tags/5.0.1
^52e28dd4f2a635c2ad74abc3809eda01c0a8e3da
1bf97d258be9c2b18b9f8d2d93d64c2b30fea52c refs/tags/5.0.2
^45b57257495965e7c6ffe28b9bdaabb7fa7b83a2
33c9e76678878df3d31c8bc55c648bd1cc4c99a1 refs/tags/5.1.0
^552d7151e630ec2ef1f5e3d358946ccc60092cdd
a36f3cb1cf17e034587c4c6e1a16b52598b2179a refs/tags/5.1.1
^86d8b1a1439e7edb19793d17732b15fd784a0a15
90af4e5a700dc044a612b77ef4190398b907e889 refs/tags/5.2.0
^241de72a96f49b1545d5de3c00fae170c2675c41
0ce6a159e4e0aa1eba1eb8c09499302a9c62d74f not-for-merge branch 'feature/allow-structs-as-sender' of https://github.com/cesarferreira/SwiftEventBus
a30ff35e616f507d8a8d122dac32a2150371a87e not-for-merge branch 'master' of https://github.com/cesarferreira/SwiftEventBus
276e13088358d534ec2b6af5a9cdc6b29f13b82f not-for-merge branch 'revert-47-master' of https://github.com/cesarferreira/SwiftEventBus
e4e8d93de0da1145bc5cd321a335e903f2ab0c9e not-for-merge 'refs/pull/13/head' of https://github.com/cesarferreira/SwiftEventBus
40da1a6aa4edb45f4a13f7f5a9602eaf1e984ba4 not-for-merge 'refs/pull/16/head' of https://github.com/cesarferreira/SwiftEventBus
28300d1cdc1e92f372bcd60e704a234f30f2085f not-for-merge 'refs/pull/18/head' of https://github.com/cesarferreira/SwiftEventBus
e051a643d52118387bb5d0f84430e3c54a9fdd45 not-for-merge 'refs/pull/20/head' of https://github.com/cesarferreira/SwiftEventBus
53aecbef63b3635be01a3c6b4caa666e33533ce7 not-for-merge 'refs/pull/21/head' of https://github.com/cesarferreira/SwiftEventBus
05ac44912160207058d2193421e4d0be40368158 not-for-merge 'refs/pull/23/head' of https://github.com/cesarferreira/SwiftEventBus
fb0e021acf449af4dbec3478e23abe8097904efd not-for-merge 'refs/pull/24/head' of https://github.com/cesarferreira/SwiftEventBus
61da869aa74e03a89e854f2e55d2d16fcbcc844d not-for-merge 'refs/pull/3/head' of https://github.com/cesarferreira/SwiftEventBus
6a09b33a22303065b0b2350182b2a5834cacf778 not-for-merge 'refs/pull/34/head' of https://github.com/cesarferreira/SwiftEventBus
d09b4320b64e82853e83975817384ac96da1a066 not-for-merge 'refs/pull/36/head' of https://github.com/cesarferreira/SwiftEventBus
ab2af426b3a340d329090b242869d0ea4c660eba not-for-merge 'refs/pull/45/head' of https://github.com/cesarferreira/SwiftEventBus
a2b1d3dfdb3c7a8a828d60e1b869a721e8b1ab1b not-for-merge 'refs/pull/46/head' of https://github.com/cesarferreira/SwiftEventBus
b0cce4977fc0e23da1004446d7ec6f7f9706f1d5 not-for-merge 'refs/pull/47/head' of https://github.com/cesarferreira/SwiftEventBus
1ab88a1f6eaf1877b1bf8ed670e2681dc1455caf not-for-merge 'refs/pull/51/head' of https://github.com/cesarferreira/SwiftEventBus
8fdb6e8f41891acdceaec768bc06d6faa9fa128b not-for-merge 'refs/pull/54/head' of https://github.com/cesarferreira/SwiftEventBus
e31bd014cc991232cd5ea677499309f3ad9122f9 not-for-merge 'refs/pull/6/head' of https://github.com/cesarferreira/SwiftEventBus
f0c10a622f1a5ea8818aa02935f874da2dcb8c7e not-for-merge 'refs/pull/62/head' of https://github.com/cesarferreira/SwiftEventBus
ab2a23532cd6a59994e80ae3c987d0001165d29c not-for-merge 'refs/pull/7/head' of https://github.com/cesarferreira/SwiftEventBus
a3c42b4f0c50672167fbe47be4151a29c7cc204d not-for-merge 'refs/pull/7/merge' of https://github.com/cesarferreira/SwiftEventBus
aa5f21eff0588e015f89aa9178f76dd5d79be5d7 not-for-merge 'refs/pull/8/head' of https://github.com/cesarferreira/SwiftEventBus
e3fba8129c4dfbe46e0ed2316b57f3eaa39aabb8 not-for-merge 'refs/pull/9/head' of https://github.com/cesarferreira/SwiftEventBus
149349d0d6d527ecbec4b54f0ede576fc53e6797 not-for-merge 'refs/pull/9/merge' of https://github.com/cesarferreira/SwiftEventBus
2510df2e742030c0df3083dd85b5ef35dd5af67d not-for-merge tag '1.0.0' of https://github.com/cesarferreira/SwiftEventBus
a161c251f10fcd18742b1b544e200d0c949adcb3 not-for-merge tag '1.1.0' of https://github.com/cesarferreira/SwiftEventBus
be2cbe06b7fda3d86971893ceee64984dc538626 not-for-merge tag '2.0.0' of https://github.com/cesarferreira/SwiftEventBus
f92b6243116f2332b6bbb3a8b81f7bfdaa311251 not-for-merge tag '2.0.1' of https://github.com/cesarferreira/SwiftEventBus
4c6e14084affc79f327fa588505ecfc2a03b3870 not-for-merge tag '2.0.2' of https://github.com/cesarferreira/SwiftEventBus
a727cea7caefea3f29de42f9fa995c10b95ad246 not-for-merge tag '2.1.0' of https://github.com/cesarferreira/SwiftEventBus
9cfef1d3a33412a42b648ef384d214b555b76d59 not-for-merge tag '2.1.1' of https://github.com/cesarferreira/SwiftEventBus
917ae5666ff0f6a1247a5d58f3029e60dff9c4d0 not-for-merge tag '2.1.2' of https://github.com/cesarferreira/SwiftEventBus
efab81530999fe9939fc78df7fbddd228f7bb588 not-for-merge tag '2.2.0' of https://github.com/cesarferreira/SwiftEventBus
5473005cc6027e644291a4931ae7addb7b37a2c3 not-for-merge tag '3.0.0' of https://github.com/cesarferreira/SwiftEventBus
60ec5d415f05b9036ce77af9dccffdc17eab18bf not-for-merge tag '3.0.1' of https://github.com/cesarferreira/SwiftEventBus
f66223012e8143fa4a37cd61c59a2cb8cb409afe not-for-merge tag '5.0.0' of https://github.com/cesarferreira/SwiftEventBus
d1516f096198824a3d06c2d201bc1cf9fc15a42d not-for-merge tag '5.0.1' of https://github.com/cesarferreira/SwiftEventBus
eb98b9baecfdc0102e4bde2a2e592f2168fad291 not-for-merge tag '5.1.0' of https://github.com/cesarferreira/SwiftEventBus
[core]
repositoryformatversion = 0
filemode = true
bare = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://github.com/cesarferreira/SwiftEventBus
fetch = +refs/*:refs/*
mirror = true
Unnamed repository; edit this file 'description' to name the repository.
#!/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+"$@"}
:
#!/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
}
#!/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;
}
#!/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
#!/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+"$@"}
:
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. 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-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git merge" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message to
# stderr if it wants to stop the merge commit.
#
# To enable this hook, rename this file to "pre-merge-commit".
. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
exec "$GIT_DIR/hooks/pre-commit"
:
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
while read local_ref local_oid remote_ref remote_oid
do
if test "$local_oid" = "$zero"
then
# Handle delete
:
else
if test "$remote_oid" = "$zero"
then
# New branch, examine all commits
range="$local_oid"
else
# Update to existing branch, examine new commits
range="$remote_oid..$local_oid"
fi
# Check for WIP commit
commit=$(git rev-list -n 1 --grep '^WIP' "$range")
if test -n "$commit"
then
echo >&2 "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up to date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
else
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/\n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/\n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]\n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / \ /
/ / / b---b C \ /
/ / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
echoback=*)
echo "echo from the pre-receive-hook: ${value#*=}" >&2
;;
reject)
exit 1
esac
i=$((i + 1))
done
fi
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi
#!/bin/sh
# An example hook script to update a checked-out tree on a git push.
#
# This hook is invoked by git-receive-pack(1) when it reacts to git
# push and updates reference(s) in its repository, and when the push
# tries to update the branch that is currently checked out and the
# receive.denyCurrentBranch configuration variable is set to
# updateInstead.
#
# By default, such a push is refused if the working tree and the index
# of the remote repository has any difference from the currently
# checked out commit; when both the working tree and the index match
# the current commit, they are updated to match the newly pushed tip
# of the branch. This hook is to be used to override the default
# behaviour; however the code below reimplements the default behaviour
# as a starting point for convenient modification.
#
# The hook receives the commit with which the tip of the current
# branch is going to be updated:
commit=$1
# It can exit with a non-zero status to refuse the push (when it does
# so, it must not modify the index or the working tree).
die () {
echo >&2 "$*"
exit 1
}
# Or it can make any necessary changes to the working tree and to the
# index to bring them to the desired state when the tip of the current
# branch is updated to the new commit, and exit with a zero status.
#
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
# in order to emulate git fetch that is run in the reverse direction
# with git push, as the two-tree form of git read-tree -u -m is
# essentially the same as git switch or git checkout that switches
# branches while keeping the local changes in the working tree that do
# not interfere with the difference between the branches.
# The below is a more-or-less exact translation to shell of the C code
# for the default behaviour for git's push-to-checkout hook defined in
# the push_to_deploy() function in builtin/receive-pack.c.
#
# Note that the hook will be executed from the repository directory,
# not from the working tree, so if you want to perform operations on
# the working tree, you will have to adapt your code accordingly, e.g.
# by adding "cd .." or using relative paths.
if ! git update-index -q --ignore-submodules --refresh
then
die "Up-to-date check failed"
fi
if ! git diff-files --quiet --ignore-submodules --
then
die "Working directory has unstaged changes"
fi
# This is a rough translation of:
#
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
if git cat-file -e HEAD 2>/dev/null
then
head=HEAD
else
head=$(git hash-object -t tree --stdin </dev/null)
fi
if ! git diff-index --quiet --cached --ignore-submodules $head --
then
die "Working directory has staged changes"
fi
if ! git read-tree -u -m "$commit"
then
die "Could not update working tree to new HEAD"
fi
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --type=bool hooks.allowunannotated)
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
echo "*** Creating a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
# delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
# pack-refs with: peeled fully-peeled sorted
0ce6a159e4e0aa1eba1eb8c09499302a9c62d74f refs/heads/feature/allow-structs-as-sender
a30ff35e616f507d8a8d122dac32a2150371a87e refs/heads/master
276e13088358d534ec2b6af5a9cdc6b29f13b82f refs/heads/revert-47-master
e4e8d93de0da1145bc5cd321a335e903f2ab0c9e refs/pull/13/head
40da1a6aa4edb45f4a13f7f5a9602eaf1e984ba4 refs/pull/16/head
28300d1cdc1e92f372bcd60e704a234f30f2085f refs/pull/18/head
e051a643d52118387bb5d0f84430e3c54a9fdd45 refs/pull/20/head
53aecbef63b3635be01a3c6b4caa666e33533ce7 refs/pull/21/head
05ac44912160207058d2193421e4d0be40368158 refs/pull/23/head
fb0e021acf449af4dbec3478e23abe8097904efd refs/pull/24/head
61da869aa74e03a89e854f2e55d2d16fcbcc844d refs/pull/3/head
6a09b33a22303065b0b2350182b2a5834cacf778 refs/pull/34/head
d09b4320b64e82853e83975817384ac96da1a066 refs/pull/36/head
ab2af426b3a340d329090b242869d0ea4c660eba refs/pull/45/head
a2b1d3dfdb3c7a8a828d60e1b869a721e8b1ab1b refs/pull/46/head
b0cce4977fc0e23da1004446d7ec6f7f9706f1d5 refs/pull/47/head
1ab88a1f6eaf1877b1bf8ed670e2681dc1455caf refs/pull/51/head
8fdb6e8f41891acdceaec768bc06d6faa9fa128b refs/pull/54/head
e31bd014cc991232cd5ea677499309f3ad9122f9 refs/pull/6/head
ab2a23532cd6a59994e80ae3c987d0001165d29c refs/pull/7/head
a3c42b4f0c50672167fbe47be4151a29c7cc204d refs/pull/7/merge
aa5f21eff0588e015f89aa9178f76dd5d79be5d7 refs/pull/8/head
e3fba8129c4dfbe46e0ed2316b57f3eaa39aabb8 refs/pull/9/head
149349d0d6d527ecbec4b54f0ede576fc53e6797 refs/pull/9/merge
2510df2e742030c0df3083dd85b5ef35dd5af67d refs/tags/1.0.0
^9a16d7daa889dd3cfdbed0f437142b6bf8c02548
a161c251f10fcd18742b1b544e200d0c949adcb3 refs/tags/1.1.0
^4b8cbb5a8227b3c29af75e0416689d26178733d8
be2cbe06b7fda3d86971893ceee64984dc538626 refs/tags/2.0.0
^768f1b856fc8d50948905e491aef6aab94ac8478
f92b6243116f2332b6bbb3a8b81f7bfdaa311251 refs/tags/2.0.1
^d03d83b8a1a591fe48138a04eee352ef76130c72
4c6e14084affc79f327fa588505ecfc2a03b3870 refs/tags/2.0.2
^f47ce7acf2999d7d1d0ed759553c54e96db12341
a727cea7caefea3f29de42f9fa995c10b95ad246 refs/tags/2.1.0
^6d9a022cdeaba45546c1eca0b8b880068ae708d2
9cfef1d3a33412a42b648ef384d214b555b76d59 refs/tags/2.1.1
^dd8cd537e4e89e204cde263351d33a99590c9572
917ae5666ff0f6a1247a5d58f3029e60dff9c4d0 refs/tags/2.1.2
^5798bb55a16602b263e67fad95140d29bc93ebb3
efab81530999fe9939fc78df7fbddd228f7bb588 refs/tags/2.2.0
^0346d72aaaae72484001d45a29c484635a91de9c
5473005cc6027e644291a4931ae7addb7b37a2c3 refs/tags/3.0.0
^13f6323427b0672493d690fff5798b459e4bd28c
60ec5d415f05b9036ce77af9dccffdc17eab18bf refs/tags/3.0.1
^4b1af9e8f0034914971dd8accf1113832a6ed661
f66223012e8143fa4a37cd61c59a2cb8cb409afe refs/tags/5.0.0
^68ffd9853630937506984d46ffbb69b567691d6f
d1516f096198824a3d06c2d201bc1cf9fc15a42d refs/tags/5.0.1
^cea5121162d88f233f392f63acbc8468fdd77927
eb98b9baecfdc0102e4bde2a2e592f2168fad291 refs/tags/5.1.0
^a30ff35e616f507d8a8d122dac32a2150371a87e
f0c10a622f1a5ea8818aa02935f874da2dcb8c7e
{
"object" : {
"artifacts" : [
],
"dependencies" : [
{
"basedOn" : null,
"packageRef" : {
"identity" : "rsbarcodes_swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/yeahdongcn/RSBarcodes_Swift.git",
"name" : "RSBarcodes_Swift"
},
"state" : {
"checkoutState" : {
"revision" : "241de72a96f49b1545d5de3c00fae170c2675c41",
"version" : "5.2.0"
},
"name" : "sourceControlCheckout"
},
"subpath" : "RSBarcodes_Swift"
},
{
"basedOn" : null,
"packageRef" : {
"identity" : "swifteventbus",
"kind" : "remoteSourceControl",
"location" : "https://github.com/cesarferreira/SwiftEventBus.git",
"name" : "SwiftEventBus"
},
"state" : {
"checkoutState" : {
"revision" : "a30ff35e616f507d8a8d122dac32a2150371a87e",
"version" : "5.1.0"
},
"name" : "sourceControlCheckout"
},
"subpath" : "SwiftEventBus"
}
]
},
"version" : 6
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.