AURRSUBEE3OL2WUCBJLNEL3WUNNIUVEBWCVVT4DHJBZRQATBQFMQC [core]repositoryformatversion = 0filemode = truebare = falselogallrefupdates = true[remote "origin"]url = https://github.com/presidentbeef/brat.gitfetch = +refs/heads/main:refs/remotes/origin/main[branch "main"]remote = originmerge = refs/heads/main[submodule "src/common/moonjit"]active = trueurl = https://github.com/moonjit/moonjit.git
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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-setupcommitmsg="$(git rev-parse --git-path hooks/commit-msg)"test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}:
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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}
#!/nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/bin/perluse 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 versionif ($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;}
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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-setupprecommit="$(git rev-parse --git-path hooks/pre-commit)"test -x "$precommit" && exec "$precommit" ${1+"$@"}:
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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>&1thenagainst=HEADelse# Initial commit: diff against an empty tree objectagainst=$(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-index --cached --name-only --diff-filter=A -z $against |LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0thencat <<\EOFError: 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 trueEOFexit 1fi# If there are whitespace errors, print the offending file names and fail.exec git diff-index --check --cached $against --
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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-setuptest -x "$GIT_DIR/hooks/pre-commit" &&exec "$GIT_DIR/hooks/pre-commit":
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash# 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_oiddoif test "$local_oid" = "$zero"then# Handle delete:elseif test "$remote_oid" = "$zero"then# New branch, examine all commitsrange="$local_oid"else# Update to existing branch, examine new commitsrange="$remote_oid..$local_oid"fi# Check for WIP commitcommit=$(git rev-list -n 1 --grep '^WIP' "$range")if test -n "$commit"thenecho >&2 "Found WIP commit in $local_ref, not pushing"exit 1fifidoneexit 0
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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=nextbasebranch="$1"if test "$#" = 2thentopic="refs/heads/$2"elsetopic=`git symbolic-ref HEAD` ||exit 0 ;# we do not interrupt rebasing detached HEADficase "$topic" inrefs/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"thenecho >&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"thennot_in_topic=`git rev-list "^$topic" master`if test -z "$not_in_topic"thenecho >&2 "$topic is already up to date with master"exit 1 ;# we could allow it, but there is no point.elseexit 0fielsenot_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`/nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/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 1fi<<\DOC_ENDThis sample hook safeguards topic branches that have beenpublished from being rewound.The workflow assumed here is:* Once a topic branch forks from "master", "master" is nevermerged 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 correctearlier mistakes, a new topic branch is created by forking atthe tip of the "master". This is not strictly necessary, butit makes it easier to keep your history simple.* Whenever you need to test or publish your changes to topicbranches, merge them into "next" branch.The script, being an example, hardcodes the publish branch nameto 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". Youngtopic branches can have stupid mistakes you would ratherclean up before publishing, and things that have not beenmerged into other branches can be easily rebased withoutaffecting other people. But once it is published, you wouldnot want to rewind it.(2) ... if a topic branch has been fully merged to "master".Then you can delete it. More importantly, you should notbuild on top of it -- other people may already want tochange things related to the topic as patches against your"master", so if you need further changes, it is better tofork the topic (perhaps with the same name) afresh from thetip 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 encourageB to be deleted.To compute (1):git rev-list ^master ^topic nextgit rev-list ^master nextif these match, topic has not merged in next at all.To compute (2):git rev-list master..topicif this is empty, it is fully merged to "master".DOC_END
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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"theni=0while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"doeval "value=\$GIT_PUSH_OPTION_$i"case "$value" inechoback=*)echo "echo from the pre-receive-hook: ${value#*=}" >&2;;reject)exit 1esaci=$((i + 1))donefi
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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=$1COMMIT_SOURCE=$2SHA1=$3/nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"# case "$COMMIT_SOURCE,$SHA1" in# ,|template,)# /nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/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# /nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"# fi
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash# 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 --refreshthendie "Up-to-date check failed"fiif ! git diff-files --quiet --ignore-submodules --thendie "Working directory has unstaged changes"fi# This is a rough translation of:## head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEXif git cat-file -e HEAD 2>/dev/nullthenhead=HEADelsehead=$(git hash-object -t tree --stdin </dev/null)fiif ! git diff-index --quiet --cached --ignore-submodules $head --thendie "Working directory has staged changes"fiif ! git read-tree -u -m "$commit"thendie "Could not update working tree to new HEAD"fi
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash# An example hook script to validate a patch (and/or patch series) before# sending it via email.## The hook should exit with non-zero status after issuing an appropriate# message if it wants to prevent the email(s) from being sent.## To enable this hook, rename this file to "sendemail-validate".## By default, it will only check that the patch(es) can be applied on top of# the default upstream branch without conflicts in a secondary worktree. After# validation (successful or not) of the last patch of a series, the worktree# will be deleted.## The following config variables can be set to change the default remote and# remote ref that are used to apply the patches against:## sendemail.validateRemote (default: origin)# sendemail.validateRemoteRef (default: HEAD)## Replace the TODO placeholders with appropriate checks according to your# needs.validate_cover_letter () {file="$1"# TODO: Replace with appropriate checks (e.g. spell checking).true}validate_patch () {file="$1"# Ensure that the patch applies without conflicts.git am -3 "$file" || return# TODO: Replace with appropriate checks for this patch# (e.g. checkpatch.pl).true}validate_series () {# TODO: Replace with appropriate checks for the whole series# (e.g. quick build, coding style checks, etc.).true}# main -------------------------------------------------------------------------if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1thenremote=$(git config --default origin --get sendemail.validateRemote) &&ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&git config --replace-all sendemail.validateWorktree "$worktree"elseworktree=$(git config --get sendemail.validateWorktree)fi || {echo "sendemail-validate: error: failed to prepare worktree" >&2exit 1}unset GIT_DIR GIT_WORK_TREEcd "$worktree" &&if grep -q "^diff --git " "$1"thenvalidate_patch "$1"elsevalidate_cover_letter "$1"fi &&if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"thengit config --unset-all sendemail.validateWorktree &&trap 'git worktree remove -ff "$worktree"' EXIT &&validate_seriesfi
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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 linerefname="$1"oldrev="$2"newrev="$3"# --- Safety checkif [ -z "$GIT_DIR" ]; thenecho "Don't run this script from the command line." >&2echo " (if you want, you could supply GIT_DIR then run" >&2echo " $0 <ref> <oldrev> <newrev>)" >&2exit 1fiif [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; thenecho "usage: $0 <ref> <oldrev> <newrev>" >&2exit 1fi# --- Configallowunannotated=$(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 descriptionprojectdesc=$(sed -e '1q' "$GIT_DIR/description")case "$projectdesc" in"Unnamed repository"* | "")echo "*** Project description file hasn't been set" >&2exit 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" ]; thennewrev_type=deleteelsenewrev_type=$(git cat-file -t $newrev)ficase "$refname","$newrev_type" inrefs/tags/*,commit)# un-annotated tagshort_refname=${refname##refs/tags/}if [ "$allowunannotated" != "true" ]; thenecho "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2exit 1fi;;refs/tags/*,delete)# delete tagif [ "$allowdeletetag" != "true" ]; thenecho "*** Deleting a tag is not allowed in this repository" >&2exit 1fi;;refs/tags/*,tag)# annotated tagif [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1thenecho "*** Tag '$refname' already exists." >&2echo "*** Modifying a tag is not allowed in this repository." >&2exit 1fi;;refs/heads/*,commit)# branchif [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; thenecho "*** Creating a branch is not allowed in this repository" >&2exit 1fi;;refs/heads/*,delete)# delete branchif [ "$allowdeletebranch" != "true" ]; thenecho "*** Deleting a branch is not allowed in this repository" >&2exit 1fi;;refs/remotes/*,commit)# tracking branch;;refs/remotes/*,delete)# delete tracking branchif [ "$allowdeletebranch" != "true" ]; thenecho "*** Deleting a tracking branch is not allowed in this repository" >&2exit 1fi;;*)# Anything else (is there anything else?)echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2exit 1;;esac# --- Finishedexit 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]# *~
0000000000000000000000000000000000000000 c5c260025fdd5083337ffb982d848acfe6af5989 tolpi <tolpifygau@gmail.com> 1773758172 +0900 clone: from https://github.com/presidentbeef/brat.gitc5c260025fdd5083337ffb982d848acfe6af5989 3161da9e6e13ad818f8951a1a1b34697aa0f06c5 tolpi <tolpifygau@gmail.com> 1773792658 +0900 commit: init3161da9e6e13ad818f8951a1a1b34697aa0f06c5 3161da9e6e13ad818f8951a1a1b34697aa0f06c5 tolpi <tolpifygau@gmail.com> 1773792667 +0900 reset: moving to HEAD3161da9e6e13ad818f8951a1a1b34697aa0f06c5 3161da9e6e13ad818f8951a1a1b34697aa0f06c5 tolpi <tolpifygau@gmail.com> 1773793831 +0900 reset: moving to 3161da9e6e13ad818f8951a1a1b34697aa0f06c53161da9e6e13ad818f8951a1a1b34697aa0f06c5 3161da9e6e13ad818f8951a1a1b34697aa0f06c5 tolpi <tolpifygau@gmail.com> 1773793850 +0900 reset: moving to 3161da9e6e13ad818f8951a1a1b34697aa0f06c5
0000000000000000000000000000000000000000 c5c260025fdd5083337ffb982d848acfe6af5989 tolpi <tolpifygau@gmail.com> 1773758172 +0900 clone: from https://github.com/presidentbeef/brat.gitc5c260025fdd5083337ffb982d848acfe6af5989 3161da9e6e13ad818f8951a1a1b34697aa0f06c5 tolpi <tolpifygau@gmail.com> 1773792658 +0900 commit: init
0000000000000000000000000000000000000000 c5c260025fdd5083337ffb982d848acfe6af5989 tolpi <tolpifygau@gmail.com> 1773758172 +0900 clone: from https://github.com/presidentbeef/brat.git
[core]repositoryformatversion = 0filemode = truebare = falselogallrefupdates = trueworktree = ../../../../../src/common/moonjit[remote "origin"]url = https://github.com/moonjit/moonjit.gitfetch = +refs/heads/*:refs/remotes/origin/*[branch "master"]remote = originmerge = refs/heads/master
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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-setupcommitmsg="$(git rev-parse --git-path hooks/commit-msg)"test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}:
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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}
#!/nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/bin/perluse 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 versionif ($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;}
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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-setupprecommit="$(git rev-parse --git-path hooks/pre-commit)"test -x "$precommit" && exec "$precommit" ${1+"$@"}:
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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>&1thenagainst=HEADelse# Initial commit: diff against an empty tree objectagainst=$(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-index --cached --name-only --diff-filter=A -z $against |LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0thencat <<\EOFError: 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 trueEOFexit 1fi# If there are whitespace errors, print the offending file names and fail.exec git diff-index --check --cached $against --
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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-setuptest -x "$GIT_DIR/hooks/pre-commit" &&exec "$GIT_DIR/hooks/pre-commit":
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash# 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_oiddoif test "$local_oid" = "$zero"then# Handle delete:elseif test "$remote_oid" = "$zero"then# New branch, examine all commitsrange="$local_oid"else# Update to existing branch, examine new commitsrange="$remote_oid..$local_oid"fi# Check for WIP commitcommit=$(git rev-list -n 1 --grep '^WIP' "$range")if test -n "$commit"thenecho >&2 "Found WIP commit in $local_ref, not pushing"exit 1fifidoneexit 0
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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=nextbasebranch="$1"if test "$#" = 2thentopic="refs/heads/$2"elsetopic=`git symbolic-ref HEAD` ||exit 0 ;# we do not interrupt rebasing detached HEADficase "$topic" inrefs/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"thenecho >&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"thennot_in_topic=`git rev-list "^$topic" master`if test -z "$not_in_topic"thenecho >&2 "$topic is already up to date with master"exit 1 ;# we could allow it, but there is no point.elseexit 0fielsenot_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`/nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/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 1fi<<\DOC_ENDThis sample hook safeguards topic branches that have beenpublished from being rewound.The workflow assumed here is:* Once a topic branch forks from "master", "master" is nevermerged 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 correctearlier mistakes, a new topic branch is created by forking atthe tip of the "master". This is not strictly necessary, butit makes it easier to keep your history simple.* Whenever you need to test or publish your changes to topicbranches, merge them into "next" branch.The script, being an example, hardcodes the publish branch nameto 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". Youngtopic branches can have stupid mistakes you would ratherclean up before publishing, and things that have not beenmerged into other branches can be easily rebased withoutaffecting other people. But once it is published, you wouldnot want to rewind it.(2) ... if a topic branch has been fully merged to "master".Then you can delete it. More importantly, you should notbuild on top of it -- other people may already want tochange things related to the topic as patches against your"master", so if you need further changes, it is better tofork the topic (perhaps with the same name) afresh from thetip 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 encourageB to be deleted.To compute (1):git rev-list ^master ^topic nextgit rev-list ^master nextif these match, topic has not merged in next at all.To compute (2):git rev-list master..topicif this is empty, it is fully merged to "master".DOC_END
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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"theni=0while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"doeval "value=\$GIT_PUSH_OPTION_$i"case "$value" inechoback=*)echo "echo from the pre-receive-hook: ${value#*=}" >&2;;reject)exit 1esaci=$((i + 1))donefi
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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=$1COMMIT_SOURCE=$2SHA1=$3/nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"# case "$COMMIT_SOURCE,$SHA1" in# ,|template,)# /nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/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# /nix/store/4pfrhja4j3j5g4iwssn9w43sgihdf4wl-perl-5.42.0/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"# fi
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash# 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 --refreshthendie "Up-to-date check failed"fiif ! git diff-files --quiet --ignore-submodules --thendie "Working directory has unstaged changes"fi# This is a rough translation of:## head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEXif git cat-file -e HEAD 2>/dev/nullthenhead=HEADelsehead=$(git hash-object -t tree --stdin </dev/null)fiif ! git diff-index --quiet --cached --ignore-submodules $head --thendie "Working directory has staged changes"fiif ! git read-tree -u -m "$commit"thendie "Could not update working tree to new HEAD"fi
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash# An example hook script to validate a patch (and/or patch series) before# sending it via email.## The hook should exit with non-zero status after issuing an appropriate# message if it wants to prevent the email(s) from being sent.## To enable this hook, rename this file to "sendemail-validate".## By default, it will only check that the patch(es) can be applied on top of# the default upstream branch without conflicts in a secondary worktree. After# validation (successful or not) of the last patch of a series, the worktree# will be deleted.## The following config variables can be set to change the default remote and# remote ref that are used to apply the patches against:## sendemail.validateRemote (default: origin)# sendemail.validateRemoteRef (default: HEAD)## Replace the TODO placeholders with appropriate checks according to your# needs.validate_cover_letter () {file="$1"# TODO: Replace with appropriate checks (e.g. spell checking).true}validate_patch () {file="$1"# Ensure that the patch applies without conflicts.git am -3 "$file" || return# TODO: Replace with appropriate checks for this patch# (e.g. checkpatch.pl).true}validate_series () {# TODO: Replace with appropriate checks for the whole series# (e.g. quick build, coding style checks, etc.).true}# main -------------------------------------------------------------------------if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1thenremote=$(git config --default origin --get sendemail.validateRemote) &&ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&git config --replace-all sendemail.validateWorktree "$worktree"elseworktree=$(git config --get sendemail.validateWorktree)fi || {echo "sendemail-validate: error: failed to prepare worktree" >&2exit 1}unset GIT_DIR GIT_WORK_TREEcd "$worktree" &&if grep -q "^diff --git " "$1"thenvalidate_patch "$1"elsevalidate_cover_letter "$1"fi &&if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"thengit config --unset-all sendemail.validateWorktree &&trap 'git worktree remove -ff "$worktree"' EXIT &&validate_seriesfi
#!/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash## 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 linerefname="$1"oldrev="$2"newrev="$3"# --- Safety checkif [ -z "$GIT_DIR" ]; thenecho "Don't run this script from the command line." >&2echo " (if you want, you could supply GIT_DIR then run" >&2echo " $0 <ref> <oldrev> <newrev>)" >&2exit 1fiif [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; thenecho "usage: $0 <ref> <oldrev> <newrev>" >&2exit 1fi# --- Configallowunannotated=$(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 descriptionprojectdesc=$(sed -e '1q' "$GIT_DIR/description")case "$projectdesc" in"Unnamed repository"* | "")echo "*** Project description file hasn't been set" >&2exit 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" ]; thennewrev_type=deleteelsenewrev_type=$(git cat-file -t $newrev)ficase "$refname","$newrev_type" inrefs/tags/*,commit)# un-annotated tagshort_refname=${refname##refs/tags/}if [ "$allowunannotated" != "true" ]; thenecho "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2exit 1fi;;refs/tags/*,delete)# delete tagif [ "$allowdeletetag" != "true" ]; thenecho "*** Deleting a tag is not allowed in this repository" >&2exit 1fi;;refs/tags/*,tag)# annotated tagif [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1thenecho "*** Tag '$refname' already exists." >&2echo "*** Modifying a tag is not allowed in this repository." >&2exit 1fi;;refs/heads/*,commit)# branchif [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; thenecho "*** Creating a branch is not allowed in this repository" >&2exit 1fi;;refs/heads/*,delete)# delete branchif [ "$allowdeletebranch" != "true" ]; thenecho "*** Deleting a branch is not allowed in this repository" >&2exit 1fi;;refs/remotes/*,commit)# tracking branch;;refs/remotes/*,delete)# delete tracking branchif [ "$allowdeletebranch" != "true" ]; thenecho "*** Deleting a tracking branch is not allowed in this repository" >&2exit 1fi;;*)# Anything else (is there anything else?)echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2exit 1;;esac# --- Finishedexit 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]# *~
0000000000000000000000000000000000000000 a2a39ea7184f3c8cab9474c6e41f6541265fb362 tolpi <tolpifygau@gmail.com> 1773758192 +0900 clone: from https://github.com/moonjit/moonjit.gita2a39ea7184f3c8cab9474c6e41f6541265fb362 d79b466025936563cdd72b5fee441f77725cc904 tolpi <tolpifygau@gmail.com> 1773758193 +0900 checkout: moving from master to d79b466025936563cdd72b5fee441f77725cc904
0000000000000000000000000000000000000000 a2a39ea7184f3c8cab9474c6e41f6541265fb362 tolpi <tolpifygau@gmail.com> 1773758192 +0900 clone: from https://github.com/moonjit/moonjit.git
0000000000000000000000000000000000000000 a2a39ea7184f3c8cab9474c6e41f6541265fb362 tolpi <tolpifygau@gmail.com> 1773758192 +0900 clone: from https://github.com/moonjit/moonjit.git
# pack-refs with: peeled fully-peeled sorteda2a39ea7184f3c8cab9474c6e41f6541265fb362 refs/remotes/origin/master9fb7dff7bb75347bc6df9c5a03b7d88693c051a4 refs/remotes/origin/msvc-test39bf7e089f71811bcbe8dc5430434f071d38add2 refs/remotes/origin/v2.0486dc709c9f26379867c899d3e680ae2482f249e refs/remotes/origin/v2.1da2c737e00983fd1e2964641d7d39870c273e5d5 refs/remotes/origin/v2.2-release-prepea8028cf7514e24dd0e411844a012ecc3a27f093 refs/tags/2.1.199168476b9f6e1910057181428f2225b09458747 refs/tags/2.1.2f6952746a54c2174e16dda0532850477db7403b9 refs/tags/2.2.0^f409987a39f7552dcf426ca60cca97c30df7dc621c87e686dbd3caffcf6bb44fb8651ab4867ae2fc refs/tags/luajit-2.1.0-2019090251d9200ca48196e7792ffaa8c57375ab78675e341 refs/tags/luajit-fedora-2019092576646db21bb1eb8f2b7f4060794d690fd356f7e7 refs/tags/v2.0.0^87d74a8f3d8f5a53fc7ad1fd45adcc06db4bcde8d07df26407484c47d7c0ae7d2678489b1b5d4cc0 refs/tags/v2.0.0-beta1^55b16959717084884fd4a0cbae6d19e3786c20c75604fb7e0882aff375119585f23e9cfb76a854ba refs/tags/v2.0.0-beta10^51f05d64c93b5c1e8ba152740012454f399b996d7904aa1a9a723faa716d771bdfbc37f718eb0951 refs/tags/v2.0.0-beta11^4baa01be78e5b9132ec94763126e01d82ab566263e30b4475e82211de4ce731f17826d83e31c87a9 refs/tags/v2.0.0-beta2^1d1fed48a002dfc0919135911057ebc255a53e0a7b4f55ad89766c545f7ddea6afdff631a76acde8 refs/tags/v2.0.0-beta2-hotfix2^5287b9326479ea2b7dddd6f642673e58e5a7f3546d14e21b7e8841ff7a31010722d5ece4a6739620 refs/tags/v2.0.0-beta3^09e875519b153bf7bc6fa5e1dbc1cfcdcb1e9aff0f68ef93a76c4fbe1b5ae0e1ebe5be747897204b refs/tags/v2.0.0-beta4^23189fa40d8cda4fa039a44b1211771b3d34fc7b571758fee1ccbfdffc04059f35ef2760a712d0a9 refs/tags/v2.0.0-beta5^d668373654898d47de56061b4b2b31a1780ce476b2ab0d6d52d2abb39c7b53500bfc967b2990e726 refs/tags/v2.0.0-beta6^97d84111fd38ccd61897c21b05a10bacf4e3c829c54f01de7cf4be6e6db5b9139daed41dfb451acb refs/tags/v2.0.0-beta7^cfdc356ebe376d9d2d741bae8fd33d1cbdc74f4fd07ecf2c80930b9bfd3b10d38e5616e9c375f3b8 refs/tags/v2.0.0-beta8^9b0c641ac18b560c45173c741c0880fd21fbba609fcdb096c36cc4a17e403510d4f2b5605ffcf995 refs/tags/v2.0.0-beta8-fixed^29e89adfa74d4c14db67d2a267215e002f03e2cefc0c13faa4e5037850efd7a1fd2bae5eb6fa6910 refs/tags/v2.0.0-beta9^6ace80c897a8359bedd3f195d126725cb0bf0f8da87a1cbff55028c6e8a2411d66a6986815bdadb5 refs/tags/v2.0.0-rc1^eb6f890ebd01ee4cf4f31a66d8a946bc8dccd8855b0ecdc8ca6a0f5c6b1f8e044db443a32356050b refs/tags/v2.0.0-rc2^e941caafcf2e549d7c994363c50eaaf6aa082842a42f5a87286b0509b80652918a7dc28c53ba259e refs/tags/v2.0.0-rc3^87d74a8f3d8f5a53fc7ad1fd45adcc06db4bcde826632aa933ce63d398bd5d52dad938e597ce5cf1 refs/tags/v2.0.1^92699e9ea9371173eb0d9f5fefa703878059009c97122bfc25eafe39674ce3beb1298a9f64a635f4 refs/tags/v2.0.1-fixed^e7633dba1e446763454a7969ce7e27139debc6cdf2397a87a27d13a607edcdbac0b8029adcfe7455 refs/tags/v2.0.2^21af151af28d4b3524684b106bd19b02484f67f1541182eebacdf11b552ccdd3c95c602e60ec5f98 refs/tags/v2.0.3^880ca300e8fb7b432b9d25ed377db2102e4cb63d4085f7cdc534b5287a0db07c00a58bd95fd64755 refs/tags/v2.0.4^69e5342eb893815b18a1ec84ba74b0e0d1cc9beb614c60e32a022acc665aec33f19dc0f9234330a4 refs/tags/v2.0.5^0bf80b07b0672ce874feedcc777afe1b791ccb5a4017ddd51adea354adca0b97d655142f94a7d9d0 refs/tags/v2.1-111820136b448718ebee10350d93022070cc40249c4cc8c6 refs/tags/v2.1-112520139fbd55aebb401673daf447bfe9fde269545c637e refs/tags/v2.1-120320136cf3c8d56e1f00cc273fdf34a88260b0b13e6086 refs/tags/v2.1-20131211c865570245a4371bd9dcd157e1e3deb437651b3c refs/tags/v2.1-20131219cb049482b877ecb08add71f1d648e3b7de5dd46c refs/tags/v2.1-20140101913e838e9e636ad84fbba3c964bcb8511d759431 refs/tags/v2.1-20140129f4636de35172ee92513f2af513dd2443998f2579 refs/tags/v2.1-20140204a89ac42196c9eeb2873facf26d789596917e806d refs/tags/v2.1-20140207395fc489b2d68bf74c0fb96c40c21980a03b949d refs/tags/v2.1-20140228260c0d4189cde54eb9fea8429d8d480078a3e668 refs/tags/v2.1-201403043494258fce857a764cc19c3d857274ffbab3e7ba refs/tags/v2.1-20140305e037daecf44d82c81e5f40320a94583fa47b0800 refs/tags/v2.1-201403131a5fa910c80cdee1d8ad77b3df9c31ff000c09fd refs/tags/v2.1-20140325c544042632cf95593eb31fa67fe7b495f706336d refs/tags/v2.1-20140330fcf42cbcb5f78519aeeb18070ff3e494c757ce42 refs/tags/v2.1-2014040179140fcf5ec4289683cdf77308f1d3c52ffdbb36 refs/tags/v2.1-2014040359ff33299f62c9d839abc032e63ded55683a871f refs/tags/v2.1-2014041137807ce678ffc21bad8afe12936bb6435dc33b85 refs/tags/v2.1-20140419f962a69eb9838e0953f5f3ec9586153efd57e4ab refs/tags/v2.1-2014042312976951520916ea2a3f15d321c1d17c3d1f0cf3 refs/tags/v2.1-2014051389410a3de64a32a21ec048a3f802be1fb4debfad refs/tags/v2.1-20140515c7c4fd0c650dbbfe6d0e2891cbf86f6e0434ae52 refs/tags/v2.1-20140515-2c2f70b6771f9b537be189a220702ba8f983f4aeb refs/tags/v2.1-201405206438ea4b9092c03bd0d0cc95ae5bf5853fcab200 refs/tags/v2.1-201405291f3fe1624f04d2fb75589f908d8a1be5650c69d8 refs/tags/v2.1-201405310342b387d4f7b814049d3b1f58389c411c5d7120 refs/tags/v2.1-20140607b1c9543aaa2ef47ccb96e178b0f45573af4eafde refs/tags/v2.1-201406275a4044983655ae5ff16deb7c589f3a9e76e49369 refs/tags/v2.1-20140703231447d0b323e7bdec7fef4ff51654ade02858a7 refs/tags/v2.1-201407071e28da2a553b5c26eec396eddc5140617a1c4927 refs/tags/v2.1-20140731e9ba82d47a40b293a7912b3047a9e25f70243ba3 refs/tags/v2.1-201408054bf56c70068f5190e9a27b47e4fed3265c4eb40f refs/tags/v2.1-20140920853c40857173b193156ac726220ccee00ef84527 refs/tags/v2.1-20141024aa8fc2eb597626e592066721a15e76bb711a80db refs/tags/v2.1-201411155c48714c439739fa7134e40e99a04580a2a1ae3f refs/tags/v2.1-20141128d35e6ef4ae17b542470bfe29be9c45d7d7f92b4a refs/tags/v2.1-2015012079128d720a4a334d257b08ee7afef63bb5dff568 refs/tags/v2.1-201502188965489f22e25cb17adca91110af3893d829923e refs/tags/v2.1-20150223b88b7a3bb911623df70ac26cce7de1adc9c3679c refs/tags/v2.1-201503315d54514756c60c773d2426cb10f22fd743485990 refs/tags/v2.1-20150622f4db99d7af76aa82ca2e4cd26c2da183a5359d3c refs/tags/v2.1-201510283459e93df3922cd59d3a15ff51c00d5bb17d3c69 refs/tags/v2.1-2015120509ab905369b2af8a9c8229871afb46c2c0dcfb89 refs/tags/v2.1-20151219fb564b83033d57aca7be863a4ef7858fe92b885f refs/tags/v2.1-20160108017aef1e10c6f4a9a664ecb8fe7fa97c581cfbf6 refs/tags/v2.1-20160514ec9b238a45639edda41996341eb8156dbdbf1a0e refs/tags/v2.1-2016051697369c48070d88238dcd45488b296fec693a2dfe refs/tags/v2.1-20160517e244b1dd7067695faac93295c706c378ff85d9c2 refs/tags/v2.1-201611049ccc8867b8e520906271ca36e954032054b07e33 refs/tags/v2.1-2017040581158e76e69ab777619ad15955ead151ad3baf29 refs/tags/v2.1-20170513478c24673b02150dc401145379a01934a1817c03 refs/tags/v2.1-201705177897b76bc047a546afd5e7c591c0d3e91c6b5039 refs/tags/v2.1-20170808f747eb52bc4b1b2bcb5c9454d1ec5aabd327716e refs/tags/v2.1-2017092599304a93bb661b3f3afbe4c54d50c705e14c35a3 refs/tags/v2.1-20171103b8b4e19685154d18d942f41b2954ad42e613b179 refs/tags/v2.1-20180419b982ebb5d52b48bce0d101f6621b1ea97b7ae130 refs/tags/v2.1-20180420c58fe79b870f1934479bf14fe8035fc3d9fdfde2 refs/tags/v2.1-201810291951d9a4065cb84738d9077c1a77475cc81b4a6d refs/tags/v2.1-201901150bb64bab055a417fc73e3967d68f16ea948ebf88 refs/tags/v2.1-201901300e646b54e1368acb2e39d89014ae649207f4d0a0 refs/tags/v2.1-20190131864c72e31e9ea9488bd64a441790fee916481da3 refs/tags/v2.1-20190221a2b65c06faef8ebbdc3952d4e90d17b442ca8bbf refs/tags/v2.1-20190228^0825f1b0f98fceafef5a6b87a3adf4b54a7f157b47b62bb804d4c2a151260f613d16defe0fbe54ad refs/tags/v2.1-20190302f15e5367f9e3747b28ec227e83399f3a0ddf6bf4 refs/tags/v2.1-20190329^83c82b550ec0f59d4c73231a8594fd83165d6f54813f6c555a97b693469d0a2c0ba2e704b2d7fa6d refs/tags/v2.1-20190507^cf42ccb88c426a6fa7e42317ebf69d04c570f0cca89b37a58fd1fdfc128ac3d430102bbce48d6a6a refs/tags/v2.1-20190530b6f2c457308c9fc7db6ccbe86e5c78098bdc88d3 refs/tags/v2.1-20190626d0cda5cc00af8a6e86e3e0da9ea46ca593c3986c refs/tags/v2.1-20190912e6ff5aef9786129035dfbde1cd13d217eecc9a08 refs/tags/v2.1.0-beta1^fb77f7dee7fff698736b48392a6057c60d0d7c2be9bfff8e77a96eacd80795d44f9c0670bbacb7a8 refs/tags/v2.1.0-beta2^3e4a196777450f7db11067e93a17655ba3ee0d5306a6ff5782462126ac3d084a1f991244d46cf554 refs/tags/v2.1.0-beta3^8271c643c21d1b2f344e339f559f2de6f3663191