From 69dfe43ffc865bfa9c7a81375752d064a0013df3 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Tue, 12 Sep 2017 07:51:12 +0200 Subject: Fix some tests : make coverage -> test (#2492) * Fix test : make coverage -> test * Refactor integration tests to be able to run them in parallel * Add custom local repository temp path --- .../gitea-repositories/user2/repo1.git/HEAD | 1 - .../gitea-repositories/user2/repo1.git/config | 4 - .../gitea-repositories/user2/repo1.git/description | 1 - .../user2/repo1.git/hooks/applypatch-msg.sample | 15 -- .../user2/repo1.git/hooks/commit-msg.sample | 24 --- .../user2/repo1.git/hooks/post-receive | 7 - .../user2/repo1.git/hooks/post-receive.d/gitea | 2 - .../user2/repo1.git/hooks/post-update.sample | 8 - .../user2/repo1.git/hooks/pre-applypatch.sample | 14 -- .../user2/repo1.git/hooks/pre-commit.sample | 49 ------ .../user2/repo1.git/hooks/pre-push.sample | 53 ------- .../user2/repo1.git/hooks/pre-rebase.sample | 169 --------------------- .../user2/repo1.git/hooks/pre-receive | 7 - .../user2/repo1.git/hooks/pre-receive.d/gitea | 2 - .../repo1.git/hooks/prepare-commit-msg.sample | 36 ----- .../user2/repo1.git/hooks/update | 7 - .../user2/repo1.git/hooks/update.d/gitea | 2 - .../user2/repo1.git/hooks/update.sample | 128 ---------------- .../user2/repo1.git/info/exclude | 6 - .../gitea-repositories/user2/repo1.git/info/refs | 1 - .../2a/2f1d4670728a2e10049e345bd7a276468beab6 | Bin 54 -> 0 bytes .../4b/4851ad51df6a7d9f25c979345979eaeb5b349f | Bin 42 -> 0 bytes .../65/f1bf27bc3bf70f64657658635e66094edbcb4d | Bin 150 -> 0 bytes .../user2/repo1.git/objects/info/packs | 1 - .../user2/repo1.git/refs/heads/DefaultBranch | 1 - .../user2/repo1.git/refs/heads/develop | 1 - .../user2/repo1.git/refs/heads/feature/1 | 1 - .../user2/repo1.git/refs/heads/master | 1 - .../gitea-repositories/user2/repo15.git/HEAD | 1 - .../gitea-repositories/user2/repo15.git/config | 4 - .../user2/repo15.git/description | 1 - .../user2/repo15.git/hooks/applypatch-msg.sample | 15 -- .../user2/repo15.git/hooks/commit-msg.sample | 24 --- .../user2/repo15.git/hooks/post-receive | 7 - .../user2/repo15.git/hooks/post-receive.d/gitea | 2 - .../user2/repo15.git/hooks/post-update.sample | 8 - .../user2/repo15.git/hooks/pre-applypatch.sample | 14 -- .../user2/repo15.git/hooks/pre-commit.sample | 49 ------ .../user2/repo15.git/hooks/pre-push.sample | 53 ------- .../user2/repo15.git/hooks/pre-rebase.sample | 169 --------------------- .../user2/repo15.git/hooks/pre-receive | 7 - .../user2/repo15.git/hooks/pre-receive.d/gitea | 2 - .../repo15.git/hooks/prepare-commit-msg.sample | 36 ----- .../user2/repo15.git/hooks/update | 7 - .../user2/repo15.git/hooks/update.d/gitea | 2 - .../user2/repo15.git/hooks/update.sample | 128 ---------------- .../user2/repo15.git/info/exclude | 6 - .../gitea-repositories/user2/repo16.git/HEAD | 1 - .../gitea-repositories/user2/repo16.git/config | 4 - .../user2/repo16.git/description | 1 - .../user2/repo16.git/hooks/applypatch-msg.sample | 15 -- .../user2/repo16.git/hooks/commit-msg.sample | 24 --- .../user2/repo16.git/hooks/post-update.sample | 8 - .../user2/repo16.git/hooks/pre-applypatch.sample | 14 -- .../user2/repo16.git/hooks/pre-commit.sample | 49 ------ .../user2/repo16.git/hooks/pre-push.sample | 53 ------- .../user2/repo16.git/hooks/pre-rebase.sample | 169 --------------------- .../user2/repo16.git/hooks/pre-receive.sample | 24 --- .../repo16.git/hooks/prepare-commit-msg.sample | 36 ----- .../user2/repo16.git/hooks/update.sample | 128 ---------------- .../user2/repo16.git/info/exclude | 6 - .../0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 | Bin 54 -> 0 bytes .../24/f83a471f77579fea57bac7255d6e64e70fce1c | Bin 54 -> 0 bytes .../27/566bd5738fc8b4e3fef3c5e72cce608537bd95 | Bin 575 -> 0 bytes .../3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f | 1 - .../45/8121ce9a6b855c9733bae62093caf3f39685de | Bin 26 -> 0 bytes .../50/99b81332712fe655e34e8dd63574f503f61811 | 2 - .../69/554a64c1e6030f051e5c3f94bfbd773cd6a324 | Bin 158 -> 0 bytes .../a4/3476a501516e065c5a82f05fd58fd319598bc1 | Bin 57 -> 0 bytes .../e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac | Bin 524 -> 0 bytes .../f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 | Bin 522 -> 0 bytes .../f9/0451c72ef61a7645293d17b47be7a8e983da57 | Bin 27 -> 0 bytes .../user2/repo16.git/refs/heads/good-sign | 1 - .../refs/heads/good-sign-not-yet-validated | 1 - .../user2/repo16.git/refs/heads/master | 1 - .../user2/repo16.git/refs/heads/not-signed | 1 - .../gitea-repositories/user3/repo3.git/HEAD | 1 - .../gitea-repositories/user3/repo3.git/config | 6 - .../gitea-repositories/user3/repo3.git/description | 1 - .../user3/repo3.git/hooks/applypatch-msg.sample | 15 -- .../user3/repo3.git/hooks/commit-msg.sample | 24 --- .../user3/repo3.git/hooks/post-receive | 7 - .../user3/repo3.git/hooks/post-receive.d/gitea | 2 - .../user3/repo3.git/hooks/post-update.sample | 8 - .../user3/repo3.git/hooks/pre-applypatch.sample | 14 -- .../user3/repo3.git/hooks/pre-commit.sample | 49 ------ .../user3/repo3.git/hooks/pre-push.sample | 53 ------- .../user3/repo3.git/hooks/pre-rebase.sample | 169 --------------------- .../user3/repo3.git/hooks/pre-receive | 7 - .../user3/repo3.git/hooks/pre-receive.d/gitea | 2 - .../user3/repo3.git/hooks/pre-receive.sample | 24 --- .../repo3.git/hooks/prepare-commit-msg.sample | 36 ----- .../user3/repo3.git/hooks/update | 7 - .../user3/repo3.git/hooks/update.d/gitea | 2 - .../user3/repo3.git/hooks/update.sample | 128 ---------------- .../user3/repo3.git/info/exclude | 6 - .../20/ade30d25e0ecaeec84e7f542a8456900858240 | Bin 84 -> 0 bytes .../27/74debeea6dc742cc4971a92db0e08b95b60588 | Bin 51 -> 0 bytes .../2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 | Bin 760 -> 0 bytes .../2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f | Bin 37 -> 0 bytes .../d5/6a3073c1dbb7b15963110a049d50cdb5db99fc | Bin 42 -> 0 bytes .../user3/repo3.git/refs/heads/master | 1 - .../gitea-repositories-meta/user2/repo1.git/HEAD | 1 + .../gitea-repositories-meta/user2/repo1.git/config | 4 + .../user2/repo1.git/description | 1 + .../user2/repo1.git/hooks/applypatch-msg.sample | 15 ++ .../user2/repo1.git/hooks/commit-msg.sample | 24 +++ .../user2/repo1.git/hooks/post-receive | 7 + .../user2/repo1.git/hooks/post-receive.d/gitea | 2 + .../user2/repo1.git/hooks/post-update.sample | 8 + .../user2/repo1.git/hooks/pre-applypatch.sample | 14 ++ .../user2/repo1.git/hooks/pre-commit.sample | 49 ++++++ .../user2/repo1.git/hooks/pre-push.sample | 53 +++++++ .../user2/repo1.git/hooks/pre-rebase.sample | 169 +++++++++++++++++++++ .../user2/repo1.git/hooks/pre-receive | 7 + .../user2/repo1.git/hooks/pre-receive.d/gitea | 2 + .../repo1.git/hooks/prepare-commit-msg.sample | 36 +++++ .../user2/repo1.git/hooks/update | 7 + .../user2/repo1.git/hooks/update.d/gitea | 2 + .../user2/repo1.git/hooks/update.sample | 128 ++++++++++++++++ .../user2/repo1.git/info/exclude | 6 + .../user2/repo1.git/info/refs | 1 + .../2a/2f1d4670728a2e10049e345bd7a276468beab6 | Bin 0 -> 54 bytes .../4b/4851ad51df6a7d9f25c979345979eaeb5b349f | Bin 0 -> 42 bytes .../65/f1bf27bc3bf70f64657658635e66094edbcb4d | Bin 0 -> 150 bytes .../user2/repo1.git/objects/info/packs | 1 + .../user2/repo1.git/refs/heads/DefaultBranch | 1 + .../user2/repo1.git/refs/heads/develop | 1 + .../user2/repo1.git/refs/heads/feature/1 | 1 + .../user2/repo1.git/refs/heads/master | 1 + .../gitea-repositories-meta/user2/repo15.git/HEAD | 1 + .../user2/repo15.git/config | 4 + .../user2/repo15.git/description | 1 + .../user2/repo15.git/hooks/applypatch-msg.sample | 15 ++ .../user2/repo15.git/hooks/commit-msg.sample | 24 +++ .../user2/repo15.git/hooks/post-receive | 7 + .../user2/repo15.git/hooks/post-receive.d/gitea | 2 + .../user2/repo15.git/hooks/post-update.sample | 8 + .../user2/repo15.git/hooks/pre-applypatch.sample | 14 ++ .../user2/repo15.git/hooks/pre-commit.sample | 49 ++++++ .../user2/repo15.git/hooks/pre-push.sample | 53 +++++++ .../user2/repo15.git/hooks/pre-rebase.sample | 169 +++++++++++++++++++++ .../user2/repo15.git/hooks/pre-receive | 7 + .../user2/repo15.git/hooks/pre-receive.d/gitea | 2 + .../repo15.git/hooks/prepare-commit-msg.sample | 36 +++++ .../user2/repo15.git/hooks/update | 7 + .../user2/repo15.git/hooks/update.d/gitea | 2 + .../user2/repo15.git/hooks/update.sample | 128 ++++++++++++++++ .../user2/repo15.git/info/exclude | 6 + .../gitea-repositories-meta/user2/repo16.git/HEAD | 1 + .../user2/repo16.git/config | 4 + .../user2/repo16.git/description | 1 + .../user2/repo16.git/hooks/applypatch-msg.sample | 15 ++ .../user2/repo16.git/hooks/commit-msg.sample | 24 +++ .../user2/repo16.git/hooks/post-update.sample | 8 + .../user2/repo16.git/hooks/pre-applypatch.sample | 14 ++ .../user2/repo16.git/hooks/pre-commit.sample | 49 ++++++ .../user2/repo16.git/hooks/pre-push.sample | 53 +++++++ .../user2/repo16.git/hooks/pre-rebase.sample | 169 +++++++++++++++++++++ .../user2/repo16.git/hooks/pre-receive.sample | 24 +++ .../repo16.git/hooks/prepare-commit-msg.sample | 36 +++++ .../user2/repo16.git/hooks/update.sample | 128 ++++++++++++++++ .../user2/repo16.git/info/exclude | 6 + .../0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 | Bin 0 -> 54 bytes .../24/f83a471f77579fea57bac7255d6e64e70fce1c | Bin 0 -> 54 bytes .../27/566bd5738fc8b4e3fef3c5e72cce608537bd95 | Bin 0 -> 575 bytes .../3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f | 1 + .../45/8121ce9a6b855c9733bae62093caf3f39685de | Bin 0 -> 26 bytes .../50/99b81332712fe655e34e8dd63574f503f61811 | 2 + .../69/554a64c1e6030f051e5c3f94bfbd773cd6a324 | Bin 0 -> 158 bytes .../a4/3476a501516e065c5a82f05fd58fd319598bc1 | Bin 0 -> 57 bytes .../e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac | Bin 0 -> 524 bytes .../f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 | Bin 0 -> 522 bytes .../f9/0451c72ef61a7645293d17b47be7a8e983da57 | Bin 0 -> 27 bytes .../user2/repo16.git/refs/heads/good-sign | 1 + .../refs/heads/good-sign-not-yet-validated | 1 + .../user2/repo16.git/refs/heads/master | 1 + .../user2/repo16.git/refs/heads/not-signed | 1 + .../gitea-repositories-meta/user3/repo3.git/HEAD | 1 + .../gitea-repositories-meta/user3/repo3.git/config | 6 + .../user3/repo3.git/description | 1 + .../user3/repo3.git/hooks/applypatch-msg.sample | 15 ++ .../user3/repo3.git/hooks/commit-msg.sample | 24 +++ .../user3/repo3.git/hooks/post-receive | 7 + .../user3/repo3.git/hooks/post-receive.d/gitea | 2 + .../user3/repo3.git/hooks/post-update.sample | 8 + .../user3/repo3.git/hooks/pre-applypatch.sample | 14 ++ .../user3/repo3.git/hooks/pre-commit.sample | 49 ++++++ .../user3/repo3.git/hooks/pre-push.sample | 53 +++++++ .../user3/repo3.git/hooks/pre-rebase.sample | 169 +++++++++++++++++++++ .../user3/repo3.git/hooks/pre-receive | 7 + .../user3/repo3.git/hooks/pre-receive.d/gitea | 2 + .../user3/repo3.git/hooks/pre-receive.sample | 24 +++ .../repo3.git/hooks/prepare-commit-msg.sample | 36 +++++ .../user3/repo3.git/hooks/update | 7 + .../user3/repo3.git/hooks/update.d/gitea | 2 + .../user3/repo3.git/hooks/update.sample | 128 ++++++++++++++++ .../user3/repo3.git/info/exclude | 6 + .../20/ade30d25e0ecaeec84e7f542a8456900858240 | Bin 0 -> 84 bytes .../27/74debeea6dc742cc4971a92db0e08b95b60588 | Bin 0 -> 51 bytes .../2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 | Bin 0 -> 760 bytes .../2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f | Bin 0 -> 37 bytes .../d5/6a3073c1dbb7b15963110a049d50cdb5db99fc | Bin 0 -> 42 bytes .../user3/repo3.git/refs/heads/master | 1 + integrations/integration_test.go | 4 +- integrations/mysql.ini | 9 +- integrations/pgsql.ini | 9 +- integrations/sqlite.ini | 9 +- 208 files changed, 2197 insertions(+), 2188 deletions(-) delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/HEAD delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/config delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/description delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/applypatch-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/commit-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-receive delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-receive.d/gitea delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-update.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-applypatch.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-commit.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-push.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-rebase.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-receive delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-receive.d/gitea delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/prepare-commit-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update.d/gitea delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update.sample delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/info/exclude delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/info/refs delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/info/packs delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/DefaultBranch delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/develop delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/feature/1 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/master delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/HEAD delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/config delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/description delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/applypatch-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/commit-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-receive delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-receive.d/gitea delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-update.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-applypatch.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-commit.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-push.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-rebase.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-receive delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-receive.d/gitea delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/prepare-commit-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update.d/gitea delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update.sample delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/info/exclude delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/HEAD delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/config delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/description delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/applypatch-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/commit-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/post-update.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-applypatch.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-commit.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-push.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-rebase.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-receive.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/prepare-commit-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/update.sample delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/info/exclude delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/good-sign delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/good-sign-not-yet-validated delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/master delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/not-signed delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/HEAD delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/config delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/description delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/applypatch-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/commit-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive.d/gitea delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-update.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-applypatch.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-commit.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-push.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.d/gitea delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/prepare-commit-msg.sample delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.d/gitea delete mode 100755 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.sample delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/info/exclude delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc delete mode 100644 integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/refs/heads/master create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/HEAD create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/config create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/description create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/applypatch-msg.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/commit-msg.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive.d/gitea create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-update.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-applypatch.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-commit.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-push.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-rebase.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive.d/gitea create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/prepare-commit-msg.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/update create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.d/gitea create mode 100755 integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.sample create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/info/exclude create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/info/refs create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/objects/info/packs create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/DefaultBranch create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/develop create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/feature/1 create mode 100644 integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/master create mode 100644 integrations/gitea-repositories-meta/user2/repo15.git/HEAD create mode 100644 integrations/gitea-repositories-meta/user2/repo15.git/config create mode 100644 integrations/gitea-repositories-meta/user2/repo15.git/description create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/applypatch-msg.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/commit-msg.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive.d/gitea create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-update.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-applypatch.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-commit.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-push.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-rebase.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive.d/gitea create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/prepare-commit-msg.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/update create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.d/gitea create mode 100755 integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.sample create mode 100644 integrations/gitea-repositories-meta/user2/repo15.git/info/exclude create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/HEAD create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/config create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/description create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/applypatch-msg.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/commit-msg.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/post-update.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-applypatch.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-commit.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-push.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-rebase.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/prepare-commit-msg.sample create mode 100755 integrations/gitea-repositories-meta/user2/repo16.git/hooks/update.sample create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/info/exclude create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign-not-yet-validated create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/master create mode 100644 integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/not-signed create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/HEAD create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/config create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/description create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/applypatch-msg.sample create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/commit-msg.sample create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive.d/gitea create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-update.sample create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-applypatch.sample create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-commit.sample create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-push.sample create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-rebase.sample create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.d/gitea create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.sample create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/prepare-commit-msg.sample create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/update create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.d/gitea create mode 100755 integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.sample create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/info/exclude create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc create mode 100644 integrations/gitea-repositories-meta/user3/repo3.git/refs/heads/master (limited to 'integrations') diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/HEAD b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/HEAD deleted file mode 100644 index cb089cd89a..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/config b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/config deleted file mode 100644 index 07d359d07c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/config +++ /dev/null @@ -1,4 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = true diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/description b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/description deleted file mode 100644 index 498b267a8c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/applypatch-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/applypatch-msg.sample deleted file mode 100755 index a5d7b84a67..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/applypatch-msg.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/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+"$@"} -: diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/commit-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/commit-msg.sample deleted file mode 100755 index b58d1184a9..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/commit-msg.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 -} diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-receive b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-receive deleted file mode 100755 index 4b3d452abc..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-receive +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-receive.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-receive.d/gitea deleted file mode 100755 index 2eb3be9836..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-receive.d/gitea +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' post-receive diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-update.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-update.sample deleted file mode 100755 index ec17ec1939..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/post-update.sample +++ /dev/null @@ -1,8 +0,0 @@ -#!/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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-applypatch.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-applypatch.sample deleted file mode 100755 index 4142082bcb..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-applypatch.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/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+"$@"} -: diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-commit.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-commit.sample deleted file mode 100755 index 68d62d5446..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-commit.sample +++ /dev/null @@ -1,49 +0,0 @@ -#!/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=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --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 -- diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-push.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-push.sample deleted file mode 100755 index 6187dbf439..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-push.sample +++ /dev/null @@ -1,53 +0,0 @@ -#!/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: -# -# -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -z40=0000000000000000000000000000000000000000 - -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # Handle delete - : - 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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-rebase.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-rebase.sample deleted file mode 100755 index 33730ca647..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-rebase.sample +++ /dev/null @@ -1,169 +0,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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-receive b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-receive deleted file mode 100755 index 4127013053..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-receive +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-receive.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-receive.d/gitea deleted file mode 100755 index 1933f6cff0..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/pre-receive.d/gitea +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' pre-receive diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/prepare-commit-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/prepare-commit-msg.sample deleted file mode 100755 index f093a02ec4..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/prepare-commit-msg.sample +++ /dev/null @@ -1,36 +0,0 @@ -#!/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 comments out the -# "Conflicts:" part of a merge commit. -# -# 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. - -case "$2,$3" in - merge,) - /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; - -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$1" ;; - - *) ;; -esac - -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update deleted file mode 100755 index c186fe4a18..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update.d/gitea deleted file mode 100755 index 615b4f4b82..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update.d/gitea +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' update $1 $2 $3 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update.sample deleted file mode 100755 index 80ba94135c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/hooks/update.sample +++ /dev/null @@ -1,128 +0,0 @@ -#!/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 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --bool hooks.allowunannotated) -allowdeletebranch=$(git config --bool hooks.allowdeletebranch) -denycreatebranch=$(git config --bool hooks.denycreatebranch) -allowdeletetag=$(git config --bool hooks.allowdeletetag) -allowmodifytag=$(git config --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="0000000000000000000000000000000000000000" -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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/info/exclude b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/info/exclude deleted file mode 100644 index a5196d1be8..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/info/exclude +++ /dev/null @@ -1,6 +0,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] -# *~ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/info/refs b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/info/refs deleted file mode 100644 index ca1df85e2e..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/info/refs +++ /dev/null @@ -1 +0,0 @@ -65f1bf27bc3bf70f64657658635e66094edbcb4d refs/heads/master diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 deleted file mode 100644 index 0994add2c8..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f deleted file mode 100644 index 700a13828e..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d deleted file mode 100644 index de48ba79f5..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/info/packs b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/info/packs deleted file mode 100644 index 8b13789179..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/objects/info/packs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/DefaultBranch b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/DefaultBranch deleted file mode 100644 index f98a263be6..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/DefaultBranch +++ /dev/null @@ -1 +0,0 @@ -65f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/develop b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/develop deleted file mode 100644 index f98a263be6..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/develop +++ /dev/null @@ -1 +0,0 @@ -65f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/feature/1 b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/feature/1 deleted file mode 100644 index f98a263be6..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/feature/1 +++ /dev/null @@ -1 +0,0 @@ -65f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/master b/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/master deleted file mode 100644 index f98a263be6..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo1.git/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -65f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/HEAD b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/HEAD deleted file mode 100644 index cb089cd89a..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/config b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/config deleted file mode 100644 index 07d359d07c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/config +++ /dev/null @@ -1,4 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = true diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/description b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/description deleted file mode 100644 index 498b267a8c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/applypatch-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/applypatch-msg.sample deleted file mode 100755 index a5d7b84a67..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/applypatch-msg.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/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+"$@"} -: diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/commit-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/commit-msg.sample deleted file mode 100755 index b58d1184a9..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/commit-msg.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 -} diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-receive b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-receive deleted file mode 100755 index 4b3d452abc..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-receive +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-receive.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-receive.d/gitea deleted file mode 100755 index 2eb3be9836..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-receive.d/gitea +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' post-receive diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-update.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-update.sample deleted file mode 100755 index ec17ec1939..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/post-update.sample +++ /dev/null @@ -1,8 +0,0 @@ -#!/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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-applypatch.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-applypatch.sample deleted file mode 100755 index 4142082bcb..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-applypatch.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/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+"$@"} -: diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-commit.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-commit.sample deleted file mode 100755 index 68d62d5446..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-commit.sample +++ /dev/null @@ -1,49 +0,0 @@ -#!/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=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --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 -- diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-push.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-push.sample deleted file mode 100755 index 6187dbf439..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-push.sample +++ /dev/null @@ -1,53 +0,0 @@ -#!/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: -# -# -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -z40=0000000000000000000000000000000000000000 - -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # Handle delete - : - 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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-rebase.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-rebase.sample deleted file mode 100755 index 33730ca647..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-rebase.sample +++ /dev/null @@ -1,169 +0,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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-receive b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-receive deleted file mode 100755 index 4127013053..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-receive +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-receive.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-receive.d/gitea deleted file mode 100755 index 1933f6cff0..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/pre-receive.d/gitea +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' pre-receive diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/prepare-commit-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/prepare-commit-msg.sample deleted file mode 100755 index f093a02ec4..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/prepare-commit-msg.sample +++ /dev/null @@ -1,36 +0,0 @@ -#!/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 comments out the -# "Conflicts:" part of a merge commit. -# -# 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. - -case "$2,$3" in - merge,) - /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; - -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$1" ;; - - *) ;; -esac - -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update deleted file mode 100755 index c186fe4a18..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update.d/gitea deleted file mode 100755 index 615b4f4b82..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update.d/gitea +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' update $1 $2 $3 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update.sample deleted file mode 100755 index 80ba94135c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/hooks/update.sample +++ /dev/null @@ -1,128 +0,0 @@ -#!/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 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --bool hooks.allowunannotated) -allowdeletebranch=$(git config --bool hooks.allowdeletebranch) -denycreatebranch=$(git config --bool hooks.denycreatebranch) -allowdeletetag=$(git config --bool hooks.allowdeletetag) -allowmodifytag=$(git config --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="0000000000000000000000000000000000000000" -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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/info/exclude b/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/info/exclude deleted file mode 100644 index a5196d1be8..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo15.git/info/exclude +++ /dev/null @@ -1,6 +0,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] -# *~ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/HEAD b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/HEAD deleted file mode 100644 index cb089cd89a..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/config b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/config deleted file mode 100644 index 07d359d07c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/config +++ /dev/null @@ -1,4 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = true diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/description b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/description deleted file mode 100644 index 498b267a8c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/applypatch-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/applypatch-msg.sample deleted file mode 100755 index a5d7b84a67..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/applypatch-msg.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/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+"$@"} -: diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/commit-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/commit-msg.sample deleted file mode 100755 index b58d1184a9..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/commit-msg.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 -} diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/post-update.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/post-update.sample deleted file mode 100755 index ec17ec1939..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/post-update.sample +++ /dev/null @@ -1,8 +0,0 @@ -#!/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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-applypatch.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-applypatch.sample deleted file mode 100755 index 4142082bcb..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-applypatch.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/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+"$@"} -: diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-commit.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-commit.sample deleted file mode 100755 index 68d62d5446..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-commit.sample +++ /dev/null @@ -1,49 +0,0 @@ -#!/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=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --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 -- diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-push.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-push.sample deleted file mode 100755 index 6187dbf439..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-push.sample +++ /dev/null @@ -1,53 +0,0 @@ -#!/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: -# -# -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -z40=0000000000000000000000000000000000000000 - -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # Handle delete - : - 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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-rebase.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-rebase.sample deleted file mode 100755 index 9773ed4cb2..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-rebase.sample +++ /dev/null @@ -1,169 +0,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 - -exit 0 - -################################################################ - -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". diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-receive.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-receive.sample deleted file mode 100755 index a1fd29ec14..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/pre-receive.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/prepare-commit-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/prepare-commit-msg.sample deleted file mode 100755 index f093a02ec4..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/prepare-commit-msg.sample +++ /dev/null @@ -1,36 +0,0 @@ -#!/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 comments out the -# "Conflicts:" part of a merge commit. -# -# 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. - -case "$2,$3" in - merge,) - /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; - -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$1" ;; - - *) ;; -esac - -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/update.sample b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/update.sample deleted file mode 100755 index 80ba94135c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/hooks/update.sample +++ /dev/null @@ -1,128 +0,0 @@ -#!/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 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --bool hooks.allowunannotated) -allowdeletebranch=$(git config --bool hooks.allowdeletebranch) -denycreatebranch=$(git config --bool hooks.denycreatebranch) -allowdeletetag=$(git config --bool hooks.allowdeletetag) -allowmodifytag=$(git config --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="0000000000000000000000000000000000000000" -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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/info/exclude b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/info/exclude deleted file mode 100644 index a5196d1be8..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/info/exclude +++ /dev/null @@ -1,6 +0,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] -# *~ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 deleted file mode 100644 index e62f09ac5f..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c deleted file mode 100644 index 2558be67ee..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 deleted file mode 100644 index 6042481f4e..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f deleted file mode 100644 index 13de5951f1..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f +++ /dev/null @@ -1 +0,0 @@ -x+)JMU06g040031Q(JMLMMaXbR10-&C˒=, \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de deleted file mode 100644 index 7db2d33de1..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 deleted file mode 100644 index 30997633f6..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 +++ /dev/null @@ -1,2 +0,0 @@ -xQ -B!EvO'!MQ׃g TKY:vN6b f&19hoV\Wiyqyj9qFj?ٟZ3 *S6# \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 deleted file mode 100644 index 77ea95d297..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 deleted file mode 100644 index e021b19eff..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac deleted file mode 100644 index 780affc887..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 deleted file mode 100644 index 7cb8b91898..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 deleted file mode 100644 index c7627ad36a..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/good-sign b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/good-sign deleted file mode 100644 index 4750a76432..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/good-sign +++ /dev/null @@ -1 +0,0 @@ -f27c2b2b03dcab38beaf89b0ab4ff61f6de63441 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/good-sign-not-yet-validated b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/good-sign-not-yet-validated deleted file mode 100644 index f68025f5b8..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/good-sign-not-yet-validated +++ /dev/null @@ -1 +0,0 @@ -27566bd5738fc8b4e3fef3c5e72cce608537bd95 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/master b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/master deleted file mode 100644 index 65f9a9f714..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -69554a64c1e6030f051e5c3f94bfbd773cd6a324 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/not-signed b/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/not-signed deleted file mode 100644 index 65f9a9f714..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user2/repo16.git/refs/heads/not-signed +++ /dev/null @@ -1 +0,0 @@ -69554a64c1e6030f051e5c3f94bfbd773cd6a324 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/HEAD b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/HEAD deleted file mode 100644 index cb089cd89a..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/config b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/config deleted file mode 100644 index e6da231579..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/config +++ /dev/null @@ -1,6 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = true - ignorecase = true - precomposeunicode = true diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/description b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/description deleted file mode 100644 index 498b267a8c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/applypatch-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/applypatch-msg.sample deleted file mode 100755 index a5d7b84a67..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/applypatch-msg.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/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+"$@"} -: diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/commit-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/commit-msg.sample deleted file mode 100755 index b58d1184a9..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/commit-msg.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 -} diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive deleted file mode 100755 index 4b3d452abc..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive.d/gitea deleted file mode 100755 index 2eb3be9836..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive.d/gitea +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' post-receive diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-update.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-update.sample deleted file mode 100755 index ec17ec1939..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-update.sample +++ /dev/null @@ -1,8 +0,0 @@ -#!/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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-applypatch.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-applypatch.sample deleted file mode 100755 index 4142082bcb..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-applypatch.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/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+"$@"} -: diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-commit.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-commit.sample deleted file mode 100755 index 68d62d5446..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-commit.sample +++ /dev/null @@ -1,49 +0,0 @@ -#!/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=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --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 -- diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-push.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-push.sample deleted file mode 100755 index 6187dbf439..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-push.sample +++ /dev/null @@ -1,53 +0,0 @@ -#!/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: -# -# -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -z40=0000000000000000000000000000000000000000 - -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # Handle delete - : - 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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample deleted file mode 100755 index 33730ca647..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample +++ /dev/null @@ -1,169 +0,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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive deleted file mode 100755 index 4127013053..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.d/gitea deleted file mode 100755 index 1933f6cff0..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.d/gitea +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' pre-receive diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.sample deleted file mode 100755 index a1fd29ec14..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/prepare-commit-msg.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/prepare-commit-msg.sample deleted file mode 100755 index f093a02ec4..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/prepare-commit-msg.sample +++ /dev/null @@ -1,36 +0,0 @@ -#!/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 comments out the -# "Conflicts:" part of a merge commit. -# -# 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. - -case "$2,$3" in - merge,) - /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; - -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$1" ;; - - *) ;; -esac - -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update deleted file mode 100755 index c186fe4a18..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 \ No newline at end of file diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.d/gitea b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.d/gitea deleted file mode 100755 index 615b4f4b82..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.d/gitea +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' update $1 $2 $3 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.sample b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.sample deleted file mode 100755 index 80ba94135c..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.sample +++ /dev/null @@ -1,128 +0,0 @@ -#!/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 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --bool hooks.allowunannotated) -allowdeletebranch=$(git config --bool hooks.allowdeletebranch) -denycreatebranch=$(git config --bool hooks.denycreatebranch) -allowdeletetag=$(git config --bool hooks.allowdeletetag) -allowmodifytag=$(git config --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="0000000000000000000000000000000000000000" -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 diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/info/exclude b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/info/exclude deleted file mode 100644 index a5196d1be8..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/info/exclude +++ /dev/null @@ -1,6 +0,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] -# *~ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 deleted file mode 100644 index 9f3ffe5f27..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 deleted file mode 100644 index 5d9226f7a1..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 deleted file mode 100644 index ca60d2314f..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f deleted file mode 100644 index e98d752dad..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc deleted file mode 100644 index eff3c9833e..0000000000 Binary files a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc and /dev/null differ diff --git a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/refs/heads/master b/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/refs/heads/master deleted file mode 100644 index ccee722d52..0000000000 --- a/integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -2a47ca4b614a9f5a43abbd5ad851a54a616ffee6 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/HEAD b/integrations/gitea-repositories-meta/user2/repo1.git/HEAD new file mode 100644 index 0000000000..cb089cd89a --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/config b/integrations/gitea-repositories-meta/user2/repo1.git/config new file mode 100644 index 0000000000..07d359d07c --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/config @@ -0,0 +1,4 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/description b/integrations/gitea-repositories-meta/user2/repo1.git/description new file mode 100644 index 0000000000..498b267a8c --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/applypatch-msg.sample b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/applypatch-msg.sample new file mode 100755 index 0000000000..a5d7b84a67 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/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+"$@"} +: diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/commit-msg.sample b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/commit-msg.sample new file mode 100755 index 0000000000..b58d1184a9 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/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 +} diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive new file mode 100755 index 0000000000..4b3d452abc --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive @@ -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 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive.d/gitea b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000..2eb3be9836 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' post-receive diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-update.sample b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-update.sample new file mode 100755 index 0000000000..ec17ec1939 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/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 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-applypatch.sample b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-applypatch.sample new file mode 100755 index 0000000000..4142082bcb --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/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+"$@"} +: diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-commit.sample b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-commit.sample new file mode 100755 index 0000000000..68d62d5446 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/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=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --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 -- diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-push.sample b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-push.sample new file mode 100755 index 0000000000..6187dbf439 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/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: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + 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 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-rebase.sample b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-rebase.sample new file mode 100755 index 0000000000..33730ca647 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/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 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive new file mode 100755 index 0000000000..4127013053 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive @@ -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 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive.d/gitea b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000..1933f6cff0 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' pre-receive diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/prepare-commit-msg.sample b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/prepare-commit-msg.sample new file mode 100755 index 0000000000..f093a02ec4 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/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 comments out the +# "Conflicts:" part of a merge commit. +# +# 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. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update new file mode 100755 index 0000000000..c186fe4a18 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update @@ -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 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.d/gitea b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.d/gitea new file mode 100755 index 0000000000..615b4f4b82 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' update $1 $2 $3 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.sample b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.sample new file mode 100755 index 0000000000..80ba94135c --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/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 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --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="0000000000000000000000000000000000000000" +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 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/info/exclude b/integrations/gitea-repositories-meta/user2/repo1.git/info/exclude new file mode 100644 index 0000000000..a5196d1be8 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/info/exclude @@ -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] +# *~ diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/info/refs b/integrations/gitea-repositories-meta/user2/repo1.git/info/refs new file mode 100644 index 0000000000..ca1df85e2e --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/info/refs @@ -0,0 +1 @@ +65f1bf27bc3bf70f64657658635e66094edbcb4d refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 b/integrations/gitea-repositories-meta/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 new file mode 100644 index 0000000000..0994add2c8 Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 differ diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f b/integrations/gitea-repositories-meta/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f new file mode 100644 index 0000000000..700a13828e Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f differ diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d b/integrations/gitea-repositories-meta/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d new file mode 100644 index 0000000000..de48ba79f5 Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d differ diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/info/packs b/integrations/gitea-repositories-meta/user2/repo1.git/objects/info/packs new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/objects/info/packs @@ -0,0 +1 @@ + diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/DefaultBranch b/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/DefaultBranch new file mode 100644 index 0000000000..f98a263be6 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/DefaultBranch @@ -0,0 +1 @@ +65f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/develop b/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/develop new file mode 100644 index 0000000000..f98a263be6 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/develop @@ -0,0 +1 @@ +65f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/feature/1 b/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/feature/1 new file mode 100644 index 0000000000..f98a263be6 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/feature/1 @@ -0,0 +1 @@ +65f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/master b/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/master new file mode 100644 index 0000000000..f98a263be6 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/master @@ -0,0 +1 @@ +65f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/HEAD b/integrations/gitea-repositories-meta/user2/repo15.git/HEAD new file mode 100644 index 0000000000..cb089cd89a --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/config b/integrations/gitea-repositories-meta/user2/repo15.git/config new file mode 100644 index 0000000000..07d359d07c --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/config @@ -0,0 +1,4 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/description b/integrations/gitea-repositories-meta/user2/repo15.git/description new file mode 100644 index 0000000000..498b267a8c --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/applypatch-msg.sample b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/applypatch-msg.sample new file mode 100755 index 0000000000..a5d7b84a67 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/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+"$@"} +: diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/commit-msg.sample b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/commit-msg.sample new file mode 100755 index 0000000000..b58d1184a9 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/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 +} diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive new file mode 100755 index 0000000000..4b3d452abc --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive @@ -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 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive.d/gitea b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000..2eb3be9836 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' post-receive diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-update.sample b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-update.sample new file mode 100755 index 0000000000..ec17ec1939 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/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 diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-applypatch.sample b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-applypatch.sample new file mode 100755 index 0000000000..4142082bcb --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/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+"$@"} +: diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-commit.sample b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-commit.sample new file mode 100755 index 0000000000..68d62d5446 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/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=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --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 -- diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-push.sample b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-push.sample new file mode 100755 index 0000000000..6187dbf439 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/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: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + 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 diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-rebase.sample b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-rebase.sample new file mode 100755 index 0000000000..33730ca647 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/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 diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive new file mode 100755 index 0000000000..4127013053 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive @@ -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 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive.d/gitea b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000..1933f6cff0 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' pre-receive diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/prepare-commit-msg.sample b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/prepare-commit-msg.sample new file mode 100755 index 0000000000..f093a02ec4 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/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 comments out the +# "Conflicts:" part of a merge commit. +# +# 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. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update new file mode 100755 index 0000000000..c186fe4a18 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update @@ -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 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.d/gitea b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.d/gitea new file mode 100755 index 0000000000..615b4f4b82 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' update $1 $2 $3 diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.sample b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.sample new file mode 100755 index 0000000000..80ba94135c --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/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 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --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="0000000000000000000000000000000000000000" +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 diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/info/exclude b/integrations/gitea-repositories-meta/user2/repo15.git/info/exclude new file mode 100644 index 0000000000..a5196d1be8 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo15.git/info/exclude @@ -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] +# *~ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/HEAD b/integrations/gitea-repositories-meta/user2/repo16.git/HEAD new file mode 100644 index 0000000000..cb089cd89a --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/config b/integrations/gitea-repositories-meta/user2/repo16.git/config new file mode 100644 index 0000000000..07d359d07c --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/config @@ -0,0 +1,4 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/description b/integrations/gitea-repositories-meta/user2/repo16.git/description new file mode 100644 index 0000000000..498b267a8c --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/applypatch-msg.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/applypatch-msg.sample new file mode 100755 index 0000000000..a5d7b84a67 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/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+"$@"} +: diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/commit-msg.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/commit-msg.sample new file mode 100755 index 0000000000..b58d1184a9 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/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 +} diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/post-update.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/post-update.sample new file mode 100755 index 0000000000..ec17ec1939 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/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 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-applypatch.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-applypatch.sample new file mode 100755 index 0000000000..4142082bcb --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/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+"$@"} +: diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-commit.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-commit.sample new file mode 100755 index 0000000000..68d62d5446 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/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=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --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 -- diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-push.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-push.sample new file mode 100755 index 0000000000..6187dbf439 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/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: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + 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 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-rebase.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-rebase.sample new file mode 100755 index 0000000000..9773ed4cb2 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/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 + +exit 0 + +################################################################ + +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". diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample new file mode 100755 index 0000000000..a1fd29ec14 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/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 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/prepare-commit-msg.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/prepare-commit-msg.sample new file mode 100755 index 0000000000..f093a02ec4 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/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 comments out the +# "Conflicts:" part of a merge commit. +# +# 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. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/update.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/update.sample new file mode 100755 index 0000000000..80ba94135c --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/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 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --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="0000000000000000000000000000000000000000" +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 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/info/exclude b/integrations/gitea-repositories-meta/user2/repo16.git/info/exclude new file mode 100644 index 0000000000..a5196d1be8 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/info/exclude @@ -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] +# *~ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 b/integrations/gitea-repositories-meta/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 new file mode 100644 index 0000000000..e62f09ac5f Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 differ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c b/integrations/gitea-repositories-meta/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c new file mode 100644 index 0000000000..2558be67ee Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c differ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 b/integrations/gitea-repositories-meta/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 new file mode 100644 index 0000000000..6042481f4e Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 differ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f b/integrations/gitea-repositories-meta/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f new file mode 100644 index 0000000000..13de5951f1 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f @@ -0,0 +1 @@ +x+)JMU06g040031Q(JMLMMaXbR10-&C˒=, \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de b/integrations/gitea-repositories-meta/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de new file mode 100644 index 0000000000..7db2d33de1 Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de differ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 b/integrations/gitea-repositories-meta/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 new file mode 100644 index 0000000000..30997633f6 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 @@ -0,0 +1,2 @@ +xQ +B!EvO'!MQ׃g TKY:vN6b f&19hoV\Wiyqyj9qFj?ٟZ3 *S6# \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 b/integrations/gitea-repositories-meta/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 new file mode 100644 index 0000000000..77ea95d297 Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 differ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 b/integrations/gitea-repositories-meta/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 new file mode 100644 index 0000000000..e021b19eff Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 differ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac b/integrations/gitea-repositories-meta/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac new file mode 100644 index 0000000000..780affc887 Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac differ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 b/integrations/gitea-repositories-meta/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 new file mode 100644 index 0000000000..7cb8b91898 Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 differ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 b/integrations/gitea-repositories-meta/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 new file mode 100644 index 0000000000..c7627ad36a Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 differ diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign b/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign new file mode 100644 index 0000000000..4750a76432 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign @@ -0,0 +1 @@ +f27c2b2b03dcab38beaf89b0ab4ff61f6de63441 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign-not-yet-validated b/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign-not-yet-validated new file mode 100644 index 0000000000..f68025f5b8 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign-not-yet-validated @@ -0,0 +1 @@ +27566bd5738fc8b4e3fef3c5e72cce608537bd95 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/master b/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/master new file mode 100644 index 0000000000..65f9a9f714 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/master @@ -0,0 +1 @@ +69554a64c1e6030f051e5c3f94bfbd773cd6a324 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/not-signed b/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/not-signed new file mode 100644 index 0000000000..65f9a9f714 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/not-signed @@ -0,0 +1 @@ +69554a64c1e6030f051e5c3f94bfbd773cd6a324 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/HEAD b/integrations/gitea-repositories-meta/user3/repo3.git/HEAD new file mode 100644 index 0000000000..cb089cd89a --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/config b/integrations/gitea-repositories-meta/user3/repo3.git/config new file mode 100644 index 0000000000..e6da231579 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/config @@ -0,0 +1,6 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/description b/integrations/gitea-repositories-meta/user3/repo3.git/description new file mode 100644 index 0000000000..498b267a8c --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/applypatch-msg.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/applypatch-msg.sample new file mode 100755 index 0000000000..a5d7b84a67 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/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+"$@"} +: diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/commit-msg.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/commit-msg.sample new file mode 100755 index 0000000000..b58d1184a9 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/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 +} diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive new file mode 100755 index 0000000000..4b3d452abc --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive @@ -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 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive.d/gitea b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive.d/gitea new file mode 100755 index 0000000000..2eb3be9836 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' post-receive diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-update.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-update.sample new file mode 100755 index 0000000000..ec17ec1939 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/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 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-applypatch.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-applypatch.sample new file mode 100755 index 0000000000..4142082bcb --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/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+"$@"} +: diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-commit.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-commit.sample new file mode 100755 index 0000000000..68d62d5446 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/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=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --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 -- diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-push.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-push.sample new file mode 100755 index 0000000000..6187dbf439 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/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: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + 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 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-rebase.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-rebase.sample new file mode 100755 index 0000000000..33730ca647 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/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 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive new file mode 100755 index 0000000000..4127013053 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive @@ -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 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.d/gitea b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.d/gitea new file mode 100755 index 0000000000..1933f6cff0 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' pre-receive diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.sample new file mode 100755 index 0000000000..a1fd29ec14 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/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 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/prepare-commit-msg.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/prepare-commit-msg.sample new file mode 100755 index 0000000000..f093a02ec4 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/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 comments out the +# "Conflicts:" part of a merge commit. +# +# 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. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update new file mode 100755 index 0000000000..c186fe4a18 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update @@ -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 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.d/gitea b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.d/gitea new file mode 100755 index 0000000000..615b4f4b82 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.d/gitea @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' update $1 $2 $3 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.sample b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.sample new file mode 100755 index 0000000000..80ba94135c --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/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 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --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="0000000000000000000000000000000000000000" +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 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/info/exclude b/integrations/gitea-repositories-meta/user3/repo3.git/info/exclude new file mode 100644 index 0000000000..a5196d1be8 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/info/exclude @@ -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] +# *~ diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 b/integrations/gitea-repositories-meta/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 new file mode 100644 index 0000000000..9f3ffe5f27 Binary files /dev/null and b/integrations/gitea-repositories-meta/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 differ diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 b/integrations/gitea-repositories-meta/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 new file mode 100644 index 0000000000..5d9226f7a1 Binary files /dev/null and b/integrations/gitea-repositories-meta/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 differ diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 b/integrations/gitea-repositories-meta/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 new file mode 100644 index 0000000000..ca60d2314f Binary files /dev/null and b/integrations/gitea-repositories-meta/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 differ diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f b/integrations/gitea-repositories-meta/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f new file mode 100644 index 0000000000..e98d752dad Binary files /dev/null and b/integrations/gitea-repositories-meta/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f differ diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc b/integrations/gitea-repositories-meta/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc new file mode 100644 index 0000000000..eff3c9833e Binary files /dev/null and b/integrations/gitea-repositories-meta/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc differ diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/refs/heads/master b/integrations/gitea-repositories-meta/user3/repo3.git/refs/heads/master new file mode 100644 index 0000000000..ccee722d52 --- /dev/null +++ b/integrations/gitea-repositories-meta/user3/repo3.git/refs/heads/master @@ -0,0 +1 @@ +2a47ca4b614a9f5a43abbd5ad851a54a616ffee6 diff --git a/integrations/integration_test.go b/integrations/integration_test.go index 4953eb280a..d43f3977b8 100644 --- a/integrations/integration_test.go +++ b/integrations/integration_test.go @@ -118,8 +118,8 @@ func initIntegrationTest() { func prepareTestEnv(t testing.TB) { assert.NoError(t, models.LoadFixtures()) - assert.NoError(t, os.RemoveAll("integrations/gitea-integration")) - assert.NoError(t, com.CopyDir("integrations/gitea-integration-meta", "integrations/gitea-integration")) + assert.NoError(t, os.RemoveAll(setting.RepoRootPath)) + assert.NoError(t, com.CopyDir("integrations/gitea-repositories-meta", setting.RepoRootPath)) } type TestSession struct { diff --git a/integrations/mysql.ini b/integrations/mysql.ini index 82acc2443a..9d3d6dfce2 100644 --- a/integrations/mysql.ini +++ b/integrations/mysql.ini @@ -11,12 +11,15 @@ SSL_MODE = disable PATH = data/gitea.db [repository] -ROOT = integrations/gitea-integration/gitea-repositories +ROOT = integrations/gitea-integration-mysql/gitea-repositories + +[repository.local] +LOCAL_COPY_PATH = tmp/local-repo-mysql [server] SSH_DOMAIN = localhost -HTTP_PORT = 3000 -ROOT_URL = http://localhost:3000/ +HTTP_PORT = 3001 +ROOT_URL = http://localhost:3001/ DISABLE_SSH = false SSH_PORT = 22 LFS_START_SERVER = false diff --git a/integrations/pgsql.ini b/integrations/pgsql.ini index fe979a6538..859e3250c1 100644 --- a/integrations/pgsql.ini +++ b/integrations/pgsql.ini @@ -11,12 +11,15 @@ SSL_MODE = disable PATH = data/gitea.db [repository] -ROOT = integrations/gitea-integration/gitea-repositories +ROOT = integrations/gitea-integration-pgsql/gitea-repositories + +[repository.local] +LOCAL_COPY_PATH = tmp/local-repo-pgsql [server] SSH_DOMAIN = localhost -HTTP_PORT = 3000 -ROOT_URL = http://localhost:3000/ +HTTP_PORT = 3002 +ROOT_URL = http://localhost:3002/ DISABLE_SSH = false SSH_PORT = 22 LFS_START_SERVER = false diff --git a/integrations/sqlite.ini b/integrations/sqlite.ini index 799a44b472..ae431a0ac3 100644 --- a/integrations/sqlite.ini +++ b/integrations/sqlite.ini @@ -6,12 +6,15 @@ DB_TYPE = sqlite3 PATH = :memory: [repository] -ROOT = integrations/gitea-integration/gitea-repositories +ROOT = integrations/gitea-integration-sqlite/gitea-repositories + +[repository.local] +LOCAL_COPY_PATH = tmp/local-repo-sqlite [server] SSH_DOMAIN = localhost -HTTP_PORT = 3000 -ROOT_URL = http://localhost:3000/ +HTTP_PORT = 3003 +ROOT_URL = http://localhost:3003/ DISABLE_SSH = false SSH_PORT = 22 LFS_START_SERVER = false -- cgit v1.2.3