A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/isomorphic-git/isomorphic-git/commit/429fde1776582561a8057125f4fe3f25cff8a970 below:

fetch without a 'ref' param should still work if HEAD points to … · isomorphic-git/isomorphic-git@429fde1 · GitHub

File tree Expand file treeCollapse file tree 62 files changed

+1137

-17

lines changed

Filter options

Expand file treeCollapse file tree 62 files changed

+1137

-17

lines changed Original file line number Diff line number Diff line change

@@ -0,0 +1 @@

1 +

ref: refs/heads/i-am-not-master

Original file line number Diff line number Diff line change

@@ -0,0 +1,8 @@

1 +

[core]

2 +

repositoryformatversion = 0

3 +

filemode = false

4 +

bare = true

5 +

symlinks = false

6 +

ignorecase = true

7 +

[remote "origin"]

8 +

url = https://github.com/wmhilton/test.empty

Original file line number Diff line number Diff line change

@@ -0,0 +1 @@

1 +

Unnamed repository; edit this file 'description' to name the repository.

Original file line number Diff line number Diff line change

@@ -0,0 +1,15 @@

1 +

#!/bin/sh

2 +

#

3 +

# An example hook script to check the commit log message taken by

4 +

# applypatch from an e-mail message.

5 +

#

6 +

# The hook should exit with non-zero status after issuing an

7 +

# appropriate message if it wants to stop the commit. The hook is

8 +

# allowed to edit the commit message file.

9 +

#

10 +

# To enable this hook, rename this file to "applypatch-msg".

11 + 12 +

. git-sh-setup

13 +

commitmsg="$(git rev-parse --git-path hooks/commit-msg)"

14 +

test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}

15 +

:

Original file line number Diff line number Diff line change

@@ -0,0 +1,24 @@

1 +

#!/bin/sh

2 +

#

3 +

# An example hook script to check the commit log message.

4 +

# Called by "git commit" with one argument, the name of the file

5 +

# that has the commit message. The hook should exit with non-zero

6 +

# status after issuing an appropriate message if it wants to stop the

7 +

# commit. The hook is allowed to edit the commit message file.

8 +

#

9 +

# To enable this hook, rename this file to "commit-msg".

10 + 11 +

# Uncomment the below to add a Signed-off-by line to the message.

12 +

# Doing this in a hook is a bad idea in general, but the prepare-commit-msg

13 +

# hook is more suited to it.

14 +

#

15 +

# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')

16 +

# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"

17 + 18 +

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

19 + 20 +

test "" = "$(grep '^Signed-off-by: ' "$1" |

21 +

sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {

22 +

echo >&2 Duplicate Signed-off-by lines.

23 +

exit 1

24 +

}

Original file line number Diff line number Diff line change

@@ -0,0 +1,8 @@

1 +

#!/bin/sh

2 +

#

3 +

# An example hook script to prepare a packed repository for use over

4 +

# dumb transports.

5 +

#

6 +

# To enable this hook, rename this file to "post-update".

7 + 8 +

exec git update-server-info

Original file line number Diff line number Diff line change

@@ -0,0 +1,14 @@

1 +

#!/bin/sh

2 +

#

3 +

# An example hook script to verify what is about to be committed

4 +

# by applypatch from an e-mail message.

5 +

#

6 +

# The hook should exit with non-zero status after issuing an

7 +

# appropriate message if it wants to stop the commit.

8 +

#

9 +

# To enable this hook, rename this file to "pre-applypatch".

10 + 11 +

. git-sh-setup

12 +

precommit="$(git rev-parse --git-path hooks/pre-commit)"

13 +

test -x "$precommit" && exec "$precommit" ${1+"$@"}

14 +

:

Original file line number Diff line number Diff line change

@@ -0,0 +1,49 @@

1 +

#!/bin/sh

2 +

#

3 +

# An example hook script to verify what is about to be committed.

4 +

# Called by "git commit" with no arguments. The hook should

5 +

# exit with non-zero status after issuing an appropriate message if

6 +

# it wants to stop the commit.

7 +

#

8 +

# To enable this hook, rename this file to "pre-commit".

9 + 10 +

if git rev-parse --verify HEAD >/dev/null 2>&1

11 +

then

12 +

against=HEAD

13 +

else

14 +

# Initial commit: diff against an empty tree object

15 +

against=4b825dc642cb6eb9a060e54bf8d69288fbee4904

16 +

fi

17 + 18 +

# If you want to allow non-ASCII filenames set this variable to true.

19 +

allownonascii=$(git config --bool hooks.allownonascii)

20 + 21 +

# Redirect output to stderr.

22 +

exec 1>&2

23 + 24 +

# Cross platform projects tend to avoid non-ASCII filenames; prevent

25 +

# them from being added to the repository. We exploit the fact that the

26 +

# printable range starts at the space character and ends with tilde.

27 +

if [ "$allownonascii" != "true" ] &&

28 +

# Note that the use of brackets around a tr range is ok here, (it's

29 +

# even required, for portability to Solaris 10's /usr/bin/tr), since

30 +

# the square bracket bytes happen to fall in the designated range.

31 +

test $(git diff --cached --name-only --diff-filter=A -z $against |

32 +

LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0

33 +

then

34 +

cat <<\EOF

35 +

Error: Attempt to add a non-ASCII file name.

36 + 37 +

This can cause problems if you want to work with people on other platforms.

38 + 39 +

To be portable it is advisable to rename the file.

40 + 41 +

If you know what you are doing you can disable this check using:

42 + 43 +

git config hooks.allownonascii true

44 +

EOF

45 +

exit 1

46 +

fi

47 + 48 +

# If there are whitespace errors, print the offending file names and fail.

49 +

exec git diff-index --check --cached $against --

Original file line number Diff line number Diff line change

@@ -0,0 +1,53 @@

1 +

#!/bin/sh

2 + 3 +

# An example hook script to verify what is about to be pushed. Called by "git

4 +

# push" after it has checked the remote status, but before anything has been

5 +

# pushed. If this script exits with a non-zero status nothing will be pushed.

6 +

#

7 +

# This hook is called with the following parameters:

8 +

#

9 +

# $1 -- Name of the remote to which the push is being done

10 +

# $2 -- URL to which the push is being done

11 +

#

12 +

# If pushing without using a named remote those arguments will be equal.

13 +

#

14 +

# Information about the commits which are being pushed is supplied as lines to

15 +

# the standard input in the form:

16 +

#

17 +

# <local ref> <local sha1> <remote ref> <remote sha1>

18 +

#

19 +

# This sample shows how to prevent push of commits where the log message starts

20 +

# with "WIP" (work in progress).

21 + 22 +

remote="$1"

23 +

url="$2"

24 + 25 +

z40=0000000000000000000000000000000000000000

26 + 27 +

while read local_ref local_sha remote_ref remote_sha

28 +

do

29 +

if [ "$local_sha" = $z40 ]

30 +

then

31 +

# Handle delete

32 +

:

33 +

else

34 +

if [ "$remote_sha" = $z40 ]

35 +

then

36 +

# New branch, examine all commits

37 +

range="$local_sha"

38 +

else

39 +

# Update to existing branch, examine new commits

40 +

range="$remote_sha..$local_sha"

41 +

fi

42 + 43 +

# Check for WIP commit

44 +

commit=`git rev-list -n 1 --grep '^WIP' "$range"`

45 +

if [ -n "$commit" ]

46 +

then

47 +

echo >&2 "Found WIP commit in $local_ref, not pushing"

48 +

exit 1

49 +

fi

50 +

fi

51 +

done

52 + 53 +

exit 0

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4