mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix bug of branches API with tests (#25578)
Fix #25558 Extract from #22743 This PR added a repository's check when creating/deleting branches via API. Mirror repository and archive repository cannot do that.
This commit is contained in:
1
tests/gitea-repositories-meta/user3/repo5.git/HEAD
Normal file
1
tests/gitea-repositories-meta/user3/repo5.git/HEAD
Normal file
@@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
6
tests/gitea-repositories-meta/user3/repo5.git/config
Normal file
6
tests/gitea-repositories-meta/user3/repo5.git/config
Normal file
@@ -0,0 +1,6 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
7
tests/gitea-repositories-meta/user3/repo5.git/hooks/post-receive
Executable file
7
tests/gitea-repositories-meta/user3/repo5.git/hooks/post-receive
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
ORI_DIR=`pwd`
|
||||
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
|
||||
cd "$ORI_DIR"
|
||||
for i in `ls "$SHELL_FOLDER/post-receive.d"`; do
|
||||
sh "$SHELL_FOLDER/post-receive.d/$i"
|
||||
done
|
2
tests/gitea-repositories-meta/user3/repo5.git/hooks/post-receive.d/gitea
Executable file
2
tests/gitea-repositories-meta/user3/repo5.git/hooks/post-receive.d/gitea
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive
|
7
tests/gitea-repositories-meta/user3/repo5.git/hooks/pre-receive
Executable file
7
tests/gitea-repositories-meta/user3/repo5.git/hooks/pre-receive
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
ORI_DIR=`pwd`
|
||||
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
|
||||
cd "$ORI_DIR"
|
||||
for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do
|
||||
sh "$SHELL_FOLDER/pre-receive.d/$i"
|
||||
done
|
2
tests/gitea-repositories-meta/user3/repo5.git/hooks/pre-receive.d/gitea
Executable file
2
tests/gitea-repositories-meta/user3/repo5.git/hooks/pre-receive.d/gitea
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive
|
7
tests/gitea-repositories-meta/user3/repo5.git/hooks/update
Executable file
7
tests/gitea-repositories-meta/user3/repo5.git/hooks/update
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
ORI_DIR=`pwd`
|
||||
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
|
||||
cd "$ORI_DIR"
|
||||
for i in `ls "$SHELL_FOLDER/update.d"`; do
|
||||
sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3
|
||||
done
|
2
tests/gitea-repositories-meta/user3/repo5.git/hooks/update.d/gitea
Executable file
2
tests/gitea-repositories-meta/user3/repo5.git/hooks/update.d/gitea
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" update $1 $2 $3
|
@@ -0,0 +1,6 @@
|
||||
# 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]
|
||||
# *~
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
2a47ca4b614a9f5a43abbd5ad851a54a616ffee6
|
@@ -0,0 +1 @@
|
||||
d22b4d4daa5be07329fcef6ed458f00cf3392da0
|
Reference in New Issue
Block a user