text
stringlengths 0
9.36M
|
|---|
:
|
else
|
if [ "$remote_sha" = $z40 ]
|
then
|
# New branch, examine all commits
|
range="$local_sha"
|
else
|
# Update to existing branch, examine new commits
|
range="$remote_sha..$local_sha"
|
fi
|
# Check for WIP commit
|
commit=`git rev-list -n 1 --grep '^WIP' "$range"`
|
if [ -n "$commit" ]
|
then
|
echo >&2 "Found WIP commit in $local_ref, not pushing"
|
exit 1
|
fi
|
fi
|
done
|
exit 0
|
File: .git/hooks/applypatch-msg.sample
|
Contents:
|
#!/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+"$@"}
|
:
|
File: .git/hooks/pre-merge-commit.sample
|
Contents:
|
#!/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"
|
:
|
File: .git/hooks/fsmonitor-watchman.sample
|
Contents:
|
#!/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 1) and a time in nanoseconds
|
# formatted as a string and outputs to stdout all files that have been
|
# modified since the given time. 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, $time) = @ARGV;
|
# Check the hook interface version
|
if ($version == 1) {
|
# convert nanoseconds to seconds
|
# subtract one second to make sure watchman will return all changes
|
$time = int ($time / 1000000000) - 1;
|
} else {
|
die "Unsupported query-fsmonitor hook version '$version'.\n" .
|
"Falling back to scanning...\n";
|
}
|
my $git_work_tree;
|
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
|
$git_work_tree = Win32::GetCwd();
|
$git_work_tree =~ tr/\\/\//;
|
} else {
|
require Cwd;
|
$git_work_tree = Cwd::cwd();
|
}
|
my $retry = 1;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.