tket 0.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tket-0.0.0/.gitignore +10 -0
- tket-0.0.0/.jj/repo/index/operations/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +1 -0
- tket-0.0.0/.jj/repo/index/operations/3157182b0065b1dae49c2aea25ff6718758432b493d602473e15c9fd6090e96f056204c3a9b6074b2cfa347b7e5af3d29060c137f557c39a42eff9b13a3e9d4a +1 -0
- tket-0.0.0/.jj/repo/index/operations/a7ba1f906bce876d9a75d175aedac8c281250fd0b2b8998b993c00ee9a110fe00a8adaaa2abceeb6c836c7924833f460bd0bb604fbbc9f8a7c63eb817e6f52d6 +1 -0
- tket-0.0.0/.jj/repo/index/operations/f02c6ffda53b7e8b99a649948e290bed3f0ce57105b9ed3687a37ae96c56c044f7bec1f8a538938fa37299c6b39a2a68cb15118952560bb524f95744a5bf7521 +1 -0
- tket-0.0.0/.jj/repo/index/segments/3d6770087c68a5cdd6cec65bd8ddefdbf42cf06921debeda6e4391e4519d21d8214bea44218af1e3c2c4adbcf33e6a90c7f1de9aba3905a57b48b69b8197ba3a +0 -0
- tket-0.0.0/.jj/repo/index/segments/d27ad326963b75736b636adad9fb812eb3f2871e0efb4bc7db37d4b701a4282911eaaee91bed3a759e940769b667be1ed66f2d7f2f41ac3906b87ab7eec19c3a +0 -0
- tket-0.0.0/.jj/repo/index/segments/ef3e77767ffff00c1a41eff788712f016d3a0546f6f7ea0b59fdee086a3ff52e5ac01ed8668e7beed2a824c0991a988370b1bd62bd8c65136aa464ab7a3b3bef +0 -0
- tket-0.0.0/.jj/repo/index/segments/f316e1a3c3e0389013b250f1c6ed8ab67120340656f9c92af09611c1b837b84dbf3c2e81192273e487ac5e4cd5fb1819fe8534aa392e4714a59933bfba7d612d +0 -0
- tket-0.0.0/.jj/repo/index/type +1 -0
- tket-0.0.0/.jj/repo/op_heads/heads/a7ba1f906bce876d9a75d175aedac8c281250fd0b2b8998b993c00ee9a110fe00a8adaaa2abceeb6c836c7924833f460bd0bb604fbbc9f8a7c63eb817e6f52d6 +0 -0
- tket-0.0.0/.jj/repo/op_heads/type +1 -0
- tket-0.0.0/.jj/repo/op_store/operations/3157182b0065b1dae49c2aea25ff6718758432b493d602473e15c9fd6090e96f056204c3a9b6074b2cfa347b7e5af3d29060c137f557c39a42eff9b13a3e9d4a +6 -0
- tket-0.0.0/.jj/repo/op_store/operations/a7ba1f906bce876d9a75d175aedac8c281250fd0b2b8998b993c00ee9a110fe00a8adaaa2abceeb6c836c7924833f460bd0bb604fbbc9f8a7c63eb817e6f52d6 +0 -0
- tket-0.0.0/.jj/repo/op_store/operations/f02c6ffda53b7e8b99a649948e290bed3f0ce57105b9ed3687a37ae96c56c044f7bec1f8a538938fa37299c6b39a2a68cb15118952560bb524f95744a5bf7521 +0 -0
- tket-0.0.0/.jj/repo/op_store/type +1 -0
- tket-0.0.0/.jj/repo/op_store/views/6f659cc521f800ab31d33699d5388160dcdcd8cb573102377bc7476e3d7851498aca155c172fb5ee7b3021a2fc9b0890169d4ad09b574659f5e706e68cbc7dfa +0 -0
- tket-0.0.0/.jj/repo/op_store/views/742c85ee7b25ffb19328167dd0844b6ab06a1738a07511d913cf25fa3a89c0251f20bc0c9ad1dcd8d12214e51f64f1a3bec4341f2d6ee764ad258e08ed326e3d +0 -0
- tket-0.0.0/.jj/repo/op_store/views/a535364e3b62bb9711b967f1916b405375fde7637402edb0e2e1bd9587ae8b9f0426e2cbc9fa15fa32c1699d958d69d897d977930046f6317053591652714802 +0 -0
- tket-0.0.0/.jj/repo/store/extra/1138cba00fc9ceae4a2527f51c1f243780fbc43762952f5c533eae355a0b9f1b89c09d8bbde0f8709827e34ebceb3d99ee1271782de588042ba7ad400e47b9f2 +0 -0
- tket-0.0.0/.jj/repo/store/extra/482ae5a29fbe856c7272f2071b8b0f0359ee2d89ff392b8a900643fbd0836eccd067b8bf41909e206c90d45d6e7d8b6686b93ecaee5fe1a9060d87b672101310 +0 -0
- tket-0.0.0/.jj/repo/store/extra/735ed171977fc0f7fbc1d8855382810bc93cdebd7ecb3ce0b4d5ea489f2b9c5e667b01146b41b1d1344359806a86d8b50ec45d68d280101b38456e0c1b5f24af +0 -0
- tket-0.0.0/.jj/repo/store/extra/92e7f849fbec6f004bfeacacce424457ab3087af868036f252695005c6f94f3c5b02cfd9b3eaa8dc170bdd31266ae5cfa78b2d48c6f73a3d24fc336306a74ecc +0 -0
- tket-0.0.0/.jj/repo/store/extra/e06f977c790044c5b275852d12d2b06d5c6a8bd6fec98e4a626bc53cb4bacc13e1d536a66ec1e6e76a36ea38d27104354f818aac6fe66c53adf6e5196ff262b4 +0 -0
- tket-0.0.0/.jj/repo/store/extra/heads/1138cba00fc9ceae4a2527f51c1f243780fbc43762952f5c533eae355a0b9f1b89c09d8bbde0f8709827e34ebceb3d99ee1271782de588042ba7ad400e47b9f2 +0 -0
- tket-0.0.0/.jj/repo/store/git/HEAD +1 -0
- tket-0.0.0/.jj/repo/store/git/config +8 -0
- tket-0.0.0/.jj/repo/store/git/description +1 -0
- tket-0.0.0/.jj/repo/store/git/hooks/applypatch-msg.sample +25 -0
- tket-0.0.0/.jj/repo/store/git/hooks/commit-msg.sample +25 -0
- tket-0.0.0/.jj/repo/store/git/hooks/docs.url +1 -0
- tket-0.0.0/.jj/repo/store/git/hooks/fsmonitor-watchman.sample +16 -0
- tket-0.0.0/.jj/repo/store/git/hooks/post-update.sample +12 -0
- tket-0.0.0/.jj/repo/store/git/hooks/pre-applypatch.sample +27 -0
- tket-0.0.0/.jj/repo/store/git/hooks/pre-commit.sample +19 -0
- tket-0.0.0/.jj/repo/store/git/hooks/pre-merge-commit.sample +16 -0
- tket-0.0.0/.jj/repo/store/git/hooks/pre-push.sample +46 -0
- tket-0.0.0/.jj/repo/store/git/hooks/pre-rebase.sample +40 -0
- tket-0.0.0/.jj/repo/store/git/hooks/prepare-commit-msg.sample +54 -0
- tket-0.0.0/.jj/repo/store/git/info/exclude +5 -0
- tket-0.0.0/.jj/repo/store/git/objects/30/27fec03b87a30f5b0c969d7da4bbc5eb73d2b8 +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/50/5a3b1ca2716907d5b292ab90c36df043c42bb6 +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/53/8868197ed218727a0d36179495801d6e7e40bd +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/54/fed25fe06e6794355d99a017e377f18eebdc45 +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/9b/74d2363309a7bfb53cdcf32748444973963817 +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/9c/4539de472c8b48c05521ea2d5615d93e73d3e5 +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/9f/23830a71a4ff0e02df9f2d5a9d8420fc338117 +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/a4/80ef2ece2ec454ddf1a724d9099fea0d03645a +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/bd/9e53e10aeb4fc188d8dc5f4a18ea96ab9474e1 +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/d9/23a67bdc654e26e9b6310928983845efdd4e27 +0 -0
- tket-0.0.0/.jj/repo/store/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- tket-0.0.0/.jj/repo/store/git/refs/jj/keep/3027fec03b87a30f5b0c969d7da4bbc5eb73d2b8 +1 -0
- tket-0.0.0/.jj/repo/store/git/refs/jj/keep/538868197ed218727a0d36179495801d6e7e40bd +1 -0
- tket-0.0.0/.jj/repo/store/git/refs/jj/keep/54fed25fe06e6794355d99a017e377f18eebdc45 +1 -0
- tket-0.0.0/.jj/repo/store/git/refs/jj/keep/9c4539de472c8b48c05521ea2d5615d93e73d3e5 +1 -0
- tket-0.0.0/.jj/repo/store/git_target +1 -0
- tket-0.0.0/.jj/repo/store/type +1 -0
- tket-0.0.0/.jj/repo/submodule_store/type +1 -0
- tket-0.0.0/.jj/working_copy/checkout +0 -0
- tket-0.0.0/.jj/working_copy/tree_state +0 -0
- tket-0.0.0/.jj/working_copy/type +1 -0
- tket-0.0.0/.python-version +1 -0
- tket-0.0.0/PKG-INFO +6 -0
- tket-0.0.0/README.md +0 -0
- tket-0.0.0/pyproject.toml +17 -0
- tket-0.0.0/src/tket/__init__.py +2 -0
tket-0.0.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d27ad326963b75736b636adad9fb812eb3f2871e0efb4bc7db37d4b701a4282911eaaee91bed3a759e940769b667be1ed66f2d7f2f41ac3906b87ab7eec19c3a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f316e1a3c3e0389013b250f1c6ed8ab67120340656f9c92af09611c1b837b84dbf3c2e81192273e487ac5e4cd5fb1819fe8534aa392e4714a59933bfba7d612d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3d6770087c68a5cdd6cec65bd8ddefdbf42cf06921debeda6e4391e4519d21d8214bea44218af1e3c2c4adbcf33e6a90c7f1de9aba3905a57b48b69b8197ba3a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ef3e77767ffff00c1a41eff788712f016d3a0546f6f7ea0b59fdee086a3ff52e5ac01ed8668e7beed2a824c0991a988370b1bd62bd8c65136aa464ab7a3b3bef
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
default
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
simple_op_heads_store
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
simple_op_store
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ref: refs/heads/main
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Unnamed repository; everything before the `;` is the name of the repository.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# A sample hook to check commit messages created by `git am`
|
|
3
|
+
###########################################################
|
|
4
|
+
#
|
|
5
|
+
# When you receive a patch via email, the `git am` command is commonly used to apply
|
|
6
|
+
# that patch. During the `git am` process, the `applypatch-msg` hook is executed before
|
|
7
|
+
# creating the commit. Its purpose is to validate and modify the commit log message
|
|
8
|
+
# before the patch is applied as a commit in your Git repository.
|
|
9
|
+
#
|
|
10
|
+
# This script serves as an example to validate that the commit message introduced by
|
|
11
|
+
# the patch from an email would pass the `commit-msg` hook, which would be executed
|
|
12
|
+
# if you had created the commit yourself.
|
|
13
|
+
#
|
|
14
|
+
# This hook is the first and followed up by `pre-applypatch` and `post-applypatch`.
|
|
15
|
+
#
|
|
16
|
+
# To enable this hook remove the `.sample` suffix from this file entirely.
|
|
17
|
+
|
|
18
|
+
# Retrieve the path of the commit-msg hook script.
|
|
19
|
+
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
|
|
20
|
+
|
|
21
|
+
# If the commit-msg hook script is executable, execute it and pass any command-line arguments to it.
|
|
22
|
+
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
|
|
23
|
+
|
|
24
|
+
# Be sure to exit without error if `exec` isn't called.
|
|
25
|
+
:
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# A sample hook to check commit messages created by `git commit`
|
|
3
|
+
################################################################
|
|
4
|
+
#
|
|
5
|
+
# This example script checks commit messages for duplicate `Signed-off-by`
|
|
6
|
+
# lines and rejects the commit if these are present.
|
|
7
|
+
#
|
|
8
|
+
# It is called by "git commit" with a single argument: the name of the file
|
|
9
|
+
# that contains the final commit message, which would be used in the commit.
|
|
10
|
+
# A a non-zero exit status after issuing an appropriate message stops the operation.
|
|
11
|
+
# The hook is allowed to edit the commit message file by rewriting the file
|
|
12
|
+
# containing it.
|
|
13
|
+
#
|
|
14
|
+
# To enable this hook remove the `.sample` suffix from this file entirely.
|
|
15
|
+
|
|
16
|
+
# Check for duplicate Signed-off-by lines in the commit message.
|
|
17
|
+
# The following command uses grep to find lines starting with "Signed-off-by: "
|
|
18
|
+
# in the commit message file specified by the first argument `$1`.
|
|
19
|
+
# It then sorts the lines, counts the number of occurrences of each line,
|
|
20
|
+
# and removes any lines that occur only once.
|
|
21
|
+
# If there are any remaining lines, it means there are duplicate Signed-off-by lines.
|
|
22
|
+
test "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" = "" || {
|
|
23
|
+
echo "Remove duplicate Signed-off-by lines and repeat the commit." 1>&2
|
|
24
|
+
exit 1
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
https://git-scm.com/docs/githooks
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/sh
|
|
2
|
+
# How to use hook-based fs-monitor integrations
|
|
3
|
+
###############################################
|
|
4
|
+
|
|
5
|
+
# This script is meant as a placeholder for integrating filesystem monitors with git
|
|
6
|
+
# using hooks in order to speed up commands like `git-status`.
|
|
7
|
+
#
|
|
8
|
+
# To setup the fs-monitor for use with watchman, run
|
|
9
|
+
# `git config core.fsmonitor .git/hooks/fsmonitor-watchman` and paste the content of
|
|
10
|
+
# the example script over at https://github.com/git/git/blob/aa9166bcc0ba654fc21f198a30647ec087f733ed/templates/hooks--fsmonitor-watchman.sample
|
|
11
|
+
# into `.git/hooks/fsmonitor-watchman`.
|
|
12
|
+
#
|
|
13
|
+
# Note that by now and as of this writing on MacOS and Windows and starting from git 2.35.1
|
|
14
|
+
# one can use the built-in fs-monitor implementation using `git config core.fsmonitor true`
|
|
15
|
+
|
|
16
|
+
exit 42
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# A sample hook that runs after receiving a pack on a remote
|
|
3
|
+
############################################################
|
|
4
|
+
# This hook is called after a pack was received on the remote, i.e. after a successful `git push` operation.
|
|
5
|
+
# It's useful on the server side only.
|
|
6
|
+
#
|
|
7
|
+
# There many more receive hooks which are documented in the official documentation: https://git-scm.com/docs/githooks.
|
|
8
|
+
#
|
|
9
|
+
# To enable this hook remove the `.sample` suffix from this file entirely.
|
|
10
|
+
|
|
11
|
+
# Update static files to support the 'dumb' git HTTP protocol.
|
|
12
|
+
exec git update-server-info
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# A sample hook to check commit messages created by `git am`
|
|
3
|
+
###########################################################
|
|
4
|
+
|
|
5
|
+
# This hook script is triggered by `git am` without any context just before creating a commit,
|
|
6
|
+
# which is useful to inspect the current tree or run scripts for further verification.
|
|
7
|
+
#
|
|
8
|
+
# If it exits with a non-zero exit code, the commit will not be created. Everything printed
|
|
9
|
+
# to the output or error channels will be visible to the user.
|
|
10
|
+
#
|
|
11
|
+
# Note that there is a sibling hook called `post-applypatch` (also without further context)
|
|
12
|
+
# which is run after the commit was created. It is useful to use the commit hash for further
|
|
13
|
+
# processing, like sending information to the involved parties.
|
|
14
|
+
# Finally, the `applypatch-msg` hook is called at the very beginning of the `git am` operation
|
|
15
|
+
# to provide access to the commit-message.
|
|
16
|
+
#
|
|
17
|
+
# To enable this hook remove the `.sample` suffix from this file entirely.
|
|
18
|
+
|
|
19
|
+
# Retrieve the path to the pre-commit hook script using the "git rev-parse" command.
|
|
20
|
+
precommit="$(git rev-parse --git-path hooks/pre-commit)"
|
|
21
|
+
|
|
22
|
+
# Check if the pre-commit hook script exists and is executable.
|
|
23
|
+
# If it does, execute it passing the arguments from this script (if any) using the "exec" command.
|
|
24
|
+
test -x "$precommit" && exec "$precommit" ${1+"$@"}
|
|
25
|
+
|
|
26
|
+
# Be sure to exit without error if `exec` isn't called.
|
|
27
|
+
:
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# A sample hook to prevent commits with merge-markers
|
|
3
|
+
#####################################################
|
|
4
|
+
# This example hook rejects changes that are about to be committed with merge markers,
|
|
5
|
+
# as that would be a clear indication of a failed merge. It is triggered by `git commit`
|
|
6
|
+
# and returning with non-zero exit status prevents the commit from being created.
|
|
7
|
+
#
|
|
8
|
+
# To enable this hook remove the `.sample` suffix from this file entirely.
|
|
9
|
+
|
|
10
|
+
# Check for merge markers in modified files
|
|
11
|
+
for file in $(git diff --cached --name-only); do
|
|
12
|
+
if grep -q -E '^(<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|)$' "$file"; then
|
|
13
|
+
echo "Error: File '$file' contains merge markers. Please remove them before committing."
|
|
14
|
+
exit 1
|
|
15
|
+
fi
|
|
16
|
+
done
|
|
17
|
+
|
|
18
|
+
# Exit with success if there are no errors
|
|
19
|
+
exit 0
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# A sample hook to check commits created by `git merge`
|
|
3
|
+
#######################################################
|
|
4
|
+
#
|
|
5
|
+
# This hook is invoked by `git merge` without further context right before creating a commit.
|
|
6
|
+
# It should be used to validate the current state that is supposed to be committed, or exit
|
|
7
|
+
# with a non-zero status to prevent the commit.
|
|
8
|
+
# All output will be visible to the user.
|
|
9
|
+
#
|
|
10
|
+
# To enable this hook remove the `.sample` suffix from this file entirely.
|
|
11
|
+
|
|
12
|
+
# Check if the pre-commit hook exists and is executable. If it is, it executes the pre-commit hook script.
|
|
13
|
+
test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit"
|
|
14
|
+
|
|
15
|
+
# Be sure to exit without error if `exec` isn't called.
|
|
16
|
+
:
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Check for "DELME" in commit messages of about-to-be-pushed commits
|
|
3
|
+
####################################################################
|
|
4
|
+
# This hook script is triggered by `git push` right after a connection to the remote
|
|
5
|
+
# was established and its initial response was received, and right before generating
|
|
6
|
+
# and pushing a pack-file.
|
|
7
|
+
# The operation will be aborted when exiting with a non-zero status.
|
|
8
|
+
#
|
|
9
|
+
# The following arguments are provided:
|
|
10
|
+
#
|
|
11
|
+
# $1 - The symbolic name of the remote to push to, like "origin" or the URL like "https://github.com/GitoxideLabs/gitoxide" if there is no such name.
|
|
12
|
+
# $2 - The URL of the remote to push to, like "https://github.com/GitoxideLabs/gitoxide".
|
|
13
|
+
#
|
|
14
|
+
# The hook should then read from standard input in a line-by-line fashion and split the following space-separated fields:
|
|
15
|
+
#
|
|
16
|
+
# * local ref - the left side of a ref-spec, i.e. "local" of the "local:refs/heads/remote" ref-spec
|
|
17
|
+
# * local hash - the hash of the commit pointed to by `local ref`
|
|
18
|
+
# * remote ref - the right side of a ref-spec, i.e. "refs/heads/remote" of the "local:refs/heads/remote" ref-spec
|
|
19
|
+
# * remote hash - the hash of the commit pointed to by `remote ref`
|
|
20
|
+
#
|
|
21
|
+
# In this example, we abort the push if any of the about-to-be-pushed commits have "DELME" in their commit message.
|
|
22
|
+
#
|
|
23
|
+
# To enable this hook remove the `.sample` suffix from this file entirely.
|
|
24
|
+
|
|
25
|
+
remote="$1"
|
|
26
|
+
url="$2"
|
|
27
|
+
|
|
28
|
+
# Check each commit being pushed
|
|
29
|
+
while read _local_ref local_hash _remote_ref _remote_hash; do
|
|
30
|
+
# Skip if the local hash is all zeroes (deletion)
|
|
31
|
+
zero_sha=$(printf "%0${#local_hash}d" 0)
|
|
32
|
+
if [ "$local_hash" = "$zero_sha" ]; then
|
|
33
|
+
continue
|
|
34
|
+
fi
|
|
35
|
+
# Get the commit message
|
|
36
|
+
commit_msg=$(git log --format=%s -n 1 "$local_hash")
|
|
37
|
+
|
|
38
|
+
# Check if the commit message contains "DELME"
|
|
39
|
+
if echo "$commit_msg" | grep -iq "DELME"; then
|
|
40
|
+
echo "Error: Found commit with 'DELME' in message. Push aborted to $remote ($url) aborted." 1>&2
|
|
41
|
+
exit 1
|
|
42
|
+
fi
|
|
43
|
+
done
|
|
44
|
+
|
|
45
|
+
# If no commit with "DELME" found, allow the push
|
|
46
|
+
exit 0
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# A sample hook to validate the branches involved in a rebase operation
|
|
3
|
+
#######################################################################
|
|
4
|
+
#
|
|
5
|
+
# This hook is invoked right before `git rebase` starts its work and
|
|
6
|
+
# prevents anything else to happen by returning a non-zero exit code.
|
|
7
|
+
#
|
|
8
|
+
# The following arguments are provided:
|
|
9
|
+
#
|
|
10
|
+
# $1 - the branch that contains the commit from which $2 was forked.
|
|
11
|
+
# $2 - the branch being rebased or no second argument at all if the rebase applies to `HEAD`.
|
|
12
|
+
#
|
|
13
|
+
# This example hook aborts the rebase operation if the branch being rebased is not up to date
|
|
14
|
+
# with the latest changes from the upstream branch, or if there are any uncommitted changes.
|
|
15
|
+
#
|
|
16
|
+
# To enable this hook remove the `.sample` suffix from this file entirely.
|
|
17
|
+
|
|
18
|
+
upstream_branch=$1
|
|
19
|
+
if [ "$#" -eq 2 ]; then
|
|
20
|
+
branch_being_rebased=$2
|
|
21
|
+
else
|
|
22
|
+
branch_being_rebased=$(git symbolic-ref --quiet --short HEAD) || exit 0 # ignore rebases on detached heads
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Check if the branch being rebased is behind the upstream branch
|
|
26
|
+
if git log --oneline ${upstream_branch}..${branch_being_rebased} > /dev/null; then
|
|
27
|
+
echo "Warning: The branch being rebased (${branch_being_rebased}) is behind the upstream branch (${upstream_branch})." 1>&2
|
|
28
|
+
echo "Please update your branch before rebasing." 1>&2
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# Check if there are any uncommitted changes
|
|
33
|
+
if ! git diff-index --quiet HEAD --; then
|
|
34
|
+
echo "Warning: There are uncommitted changes in your branch ${branch_being_rebased}." 1>&2
|
|
35
|
+
echo "Please commit or stash your changes before rebasing." 1>&2
|
|
36
|
+
exit 2
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# All good, let the rebase proceed.
|
|
40
|
+
exit 0
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# A hook called by `git commit` to adjust the commit message right before the user sees it
|
|
3
|
+
##########################################################################################
|
|
4
|
+
#
|
|
5
|
+
# This script is called by `git commit` after commit message was initialized and right before
|
|
6
|
+
# an editor is launched.
|
|
7
|
+
#
|
|
8
|
+
# It receives one to three arguments:
|
|
9
|
+
#
|
|
10
|
+
# $1 - the path to the file containing the commit message. It can be edited to change the message.
|
|
11
|
+
# $2 - the kind of source of the message contained in $1. Possible values are
|
|
12
|
+
# "message" - a message was provided via `-m` or `-F`
|
|
13
|
+
# "commit" - `-c`, `-C` or `--amend` was given
|
|
14
|
+
# "squash" - the `.git/SQUASH_MSG` file exists
|
|
15
|
+
# "merge" - this is a merge or the `.git/MERGE` file exists
|
|
16
|
+
# "template" - `-t` was provided or `commit.template` was set
|
|
17
|
+
# $3 - If $2 is "commit" then this is the hash of the commit.
|
|
18
|
+
# It can also take other values, best understood by studying the source code at
|
|
19
|
+
# https://github.com/git/git/blob/aa9166bcc0ba654fc21f198a30647ec087f733ed/builtin/commit.c#L745
|
|
20
|
+
#
|
|
21
|
+
# The following example
|
|
22
|
+
#
|
|
23
|
+
# To enable this hook remove the `.sample` suffix from this file entirely.
|
|
24
|
+
|
|
25
|
+
COMMIT_MSG_FILE=$1
|
|
26
|
+
|
|
27
|
+
# Check if the commit message file is empty or already contains a message
|
|
28
|
+
if [ -s "$COMMIT_MSG_FILE" ]; then
|
|
29
|
+
# If the commit message is already provided, exit without making any changes.
|
|
30
|
+
# This can happen if the user provided a message via `-m` or a template.
|
|
31
|
+
exit 0
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
# Retrieve the branch name from the current HEAD commit
|
|
35
|
+
BRANCH_NAME=$(git symbolic-ref --short HEAD)
|
|
36
|
+
|
|
37
|
+
# Generate a default commit message based on the branch name
|
|
38
|
+
DEFAULT_MSG=""
|
|
39
|
+
|
|
40
|
+
case "$BRANCH_NAME" in
|
|
41
|
+
"feature/*")
|
|
42
|
+
DEFAULT_MSG="feat: "
|
|
43
|
+
;;
|
|
44
|
+
"bugfix/*")
|
|
45
|
+
DEFAULT_MSG="fix: "
|
|
46
|
+
;;
|
|
47
|
+
*)
|
|
48
|
+
DEFAULT_MSG="chore: "
|
|
49
|
+
;;
|
|
50
|
+
esac
|
|
51
|
+
|
|
52
|
+
# Set the commit message that will be presented to the user.
|
|
53
|
+
echo "$DEFAULT_MSG" > "$COMMIT_MSG_FILE"
|
|
54
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# This file contains repository-wide exclude patterns that git will ignore.
|
|
2
|
+
# They are local and will not be shared when pushing or pulling.
|
|
3
|
+
# When using Rust the following would be typical exclude patterns.
|
|
4
|
+
# Remove the '# ' prefix to let them take effect.
|
|
5
|
+
# /target/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3027fec03b87a30f5b0c969d7da4bbc5eb73d2b8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
538868197ed218727a0d36179495801d6e7e40bd
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
54fed25fe06e6794355d99a017e377f18eebdc45
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9c4539de472c8b48c05521ea2d5615d93e73d3e5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
git
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
git
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
default
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
local
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
tket-0.0.0/PKG-INFO
ADDED
tket-0.0.0/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "tket"
|
|
3
|
+
version = "0.0.0"
|
|
4
|
+
description = "TKET compiler"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "Seyon Sivarajah", email = "seyon.sivarajah@quantinuum.com" }
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.12"
|
|
10
|
+
dependencies = []
|
|
11
|
+
|
|
12
|
+
[project.scripts]
|
|
13
|
+
tket = "tket:main"
|
|
14
|
+
|
|
15
|
+
[build-system]
|
|
16
|
+
requires = ["hatchling"]
|
|
17
|
+
build-backend = "hatchling.build"
|