Recreate repository due to Git object corruption (all files preserved)
This commit is contained in:
1
.git_corrupt_backup/HEAD
Normal file
1
.git_corrupt_backup/HEAD
Normal file
@@ -0,0 +1 @@
|
||||
ref: refs/heads/main
|
||||
11
.git_corrupt_backup/config
Normal file
11
.git_corrupt_backup/config
Normal file
@@ -0,0 +1,11 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
symlinks = true
|
||||
ignorecase = false
|
||||
precomposeunicode = false
|
||||
[remote "origin"]
|
||||
url = ssh://git@git.farmeris.sk:2222/filipriec/pages-tui.git
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
1
.git_corrupt_backup/description
Normal file
1
.git_corrupt_backup/description
Normal file
@@ -0,0 +1 @@
|
||||
Unnamed repository; everything before the `;` is the name of the repository.
|
||||
25
.git_corrupt_backup/hooks/applypatch-msg.sample
Normal file
25
.git_corrupt_backup/hooks/applypatch-msg.sample
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# A sample hook to check commit messages created by `git am`
|
||||
###########################################################
|
||||
#
|
||||
# When you receive a patch via email, the `git am` command is commonly used to apply
|
||||
# that patch. During the `git am` process, the `applypatch-msg` hook is executed before
|
||||
# creating the commit. Its purpose is to validate and modify the commit log message
|
||||
# before the patch is applied as a commit in your Git repository.
|
||||
#
|
||||
# This script serves as an example to validate that the commit message introduced by
|
||||
# the patch from an email would pass the `commit-msg` hook, which would be executed
|
||||
# if you had created the commit yourself.
|
||||
#
|
||||
# This hook is the first and followed up by `pre-applypatch` and `post-applypatch`.
|
||||
#
|
||||
# To enable this hook remove the `.sample` suffix from this file entirely.
|
||||
|
||||
# Retrieve the path of the commit-msg hook script.
|
||||
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
|
||||
|
||||
# If the commit-msg hook script is executable, execute it and pass any command-line arguments to it.
|
||||
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
|
||||
|
||||
# Be sure to exit without error if `exec` isn't called.
|
||||
:
|
||||
25
.git_corrupt_backup/hooks/commit-msg.sample
Normal file
25
.git_corrupt_backup/hooks/commit-msg.sample
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# A sample hook to check commit messages created by `git commit`
|
||||
################################################################
|
||||
#
|
||||
# This example script checks commit messages for duplicate `Signed-off-by`
|
||||
# lines and rejects the commit if these are present.
|
||||
#
|
||||
# It is called by "git commit" with a single argument: the name of the file
|
||||
# that contains the final commit message, which would be used in the commit.
|
||||
# A a non-zero exit status after issuing an appropriate message stops the operation.
|
||||
# The hook is allowed to edit the commit message file by rewriting the file
|
||||
# containing it.
|
||||
#
|
||||
# To enable this hook remove the `.sample` suffix from this file entirely.
|
||||
|
||||
# Check for duplicate Signed-off-by lines in the commit message.
|
||||
# The following command uses grep to find lines starting with "Signed-off-by: "
|
||||
# in the commit message file specified by the first argument `$1`.
|
||||
# It then sorts the lines, counts the number of occurrences of each line,
|
||||
# and removes any lines that occur only once.
|
||||
# If there are any remaining lines, it means there are duplicate Signed-off-by lines.
|
||||
test "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" = "" || {
|
||||
echo "Remove duplicate Signed-off-by lines and repeat the commit." 1>&2
|
||||
exit 1
|
||||
}
|
||||
1
.git_corrupt_backup/hooks/docs.url
Normal file
1
.git_corrupt_backup/hooks/docs.url
Normal file
@@ -0,0 +1 @@
|
||||
https://git-scm.com/docs/githooks
|
||||
16
.git_corrupt_backup/hooks/fsmonitor-watchman.sample
Normal file
16
.git_corrupt_backup/hooks/fsmonitor-watchman.sample
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/sh
|
||||
# How to use hook-based fs-monitor integrations
|
||||
###############################################
|
||||
|
||||
# This script is meant as a placeholder for integrating filesystem monitors with git
|
||||
# using hooks in order to speed up commands like `git-status`.
|
||||
#
|
||||
# To setup the fs-monitor for use with watchman, run
|
||||
# `git config core.fsmonitor .git/hooks/fsmonitor-watchman` and paste the content of
|
||||
# the example script over at https://github.com/git/git/blob/aa9166bcc0ba654fc21f198a30647ec087f733ed/templates/hooks--fsmonitor-watchman.sample
|
||||
# into `.git/hooks/fsmonitor-watchman`.
|
||||
#
|
||||
# Note that by now and as of this writing on MacOS and Windows and starting from git 2.35.1
|
||||
# one can use the built-in fs-monitor implementation using `git config core.fsmonitor true`
|
||||
|
||||
exit 42
|
||||
12
.git_corrupt_backup/hooks/post-update.sample
Normal file
12
.git_corrupt_backup/hooks/post-update.sample
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# A sample hook that runs after receiving a pack on a remote
|
||||
############################################################
|
||||
# This hook is called after a pack was received on the remote, i.e. after a successful `git push` operation.
|
||||
# It's useful on the server side only.
|
||||
#
|
||||
# There many more receive hooks which are documented in the official documentation: https://git-scm.com/docs/githooks.
|
||||
#
|
||||
# To enable this hook remove the `.sample` suffix from this file entirely.
|
||||
|
||||
# Update static files to support the 'dumb' git HTTP protocol.
|
||||
exec git update-server-info
|
||||
27
.git_corrupt_backup/hooks/pre-applypatch.sample
Normal file
27
.git_corrupt_backup/hooks/pre-applypatch.sample
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# A sample hook to check commit messages created by `git am`
|
||||
###########################################################
|
||||
|
||||
# This hook script is triggered by `git am` without any context just before creating a commit,
|
||||
# which is useful to inspect the current tree or run scripts for further verification.
|
||||
#
|
||||
# If it exits with a non-zero exit code, the commit will not be created. Everything printed
|
||||
# to the output or error channels will be visible to the user.
|
||||
#
|
||||
# Note that there is a sibling hook called `post-applypatch` (also without further context)
|
||||
# which is run after the commit was created. It is useful to use the commit hash for further
|
||||
# processing, like sending information to the involved parties.
|
||||
# Finally, the `applypatch-msg` hook is called at the very beginning of the `git am` operation
|
||||
# to provide access to the commit-message.
|
||||
#
|
||||
# To enable this hook remove the `.sample` suffix from this file entirely.
|
||||
|
||||
# Retrieve the path to the pre-commit hook script using the "git rev-parse" command.
|
||||
precommit="$(git rev-parse --git-path hooks/pre-commit)"
|
||||
|
||||
# Check if the pre-commit hook script exists and is executable.
|
||||
# If it does, execute it passing the arguments from this script (if any) using the "exec" command.
|
||||
test -x "$precommit" && exec "$precommit" ${1+"$@"}
|
||||
|
||||
# Be sure to exit without error if `exec` isn't called.
|
||||
:
|
||||
19
.git_corrupt_backup/hooks/pre-commit.sample
Normal file
19
.git_corrupt_backup/hooks/pre-commit.sample
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# A sample hook to prevent commits with merge-markers
|
||||
#####################################################
|
||||
# This example hook rejects changes that are about to be committed with merge markers,
|
||||
# as that would be a clear indication of a failed merge. It is triggered by `git commit`
|
||||
# and returning with non-zero exit status prevents the commit from being created.
|
||||
#
|
||||
# To enable this hook remove the `.sample` suffix from this file entirely.
|
||||
|
||||
# Check for merge markers in modified files
|
||||
for file in $(git diff --cached --name-only); do
|
||||
if grep -q -E '^(<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|)$' "$file"; then
|
||||
echo "Error: File '$file' contains merge markers. Please remove them before committing."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Exit with success if there are no errors
|
||||
exit 0
|
||||
16
.git_corrupt_backup/hooks/pre-merge-commit.sample
Normal file
16
.git_corrupt_backup/hooks/pre-merge-commit.sample
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# A sample hook to check commits created by `git merge`
|
||||
#######################################################
|
||||
#
|
||||
# This hook is invoked by `git merge` without further context right before creating a commit.
|
||||
# It should be used to validate the current state that is supposed to be committed, or exit
|
||||
# with a non-zero status to prevent the commit.
|
||||
# All output will be visible to the user.
|
||||
#
|
||||
# To enable this hook remove the `.sample` suffix from this file entirely.
|
||||
|
||||
# Check if the pre-commit hook exists and is executable. If it is, it executes the pre-commit hook script.
|
||||
test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit"
|
||||
|
||||
# Be sure to exit without error if `exec` isn't called.
|
||||
:
|
||||
46
.git_corrupt_backup/hooks/pre-push.sample
Normal file
46
.git_corrupt_backup/hooks/pre-push.sample
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
# Check for "DELME" in commit messages of about-to-be-pushed commits
|
||||
####################################################################
|
||||
# This hook script is triggered by `git push` right after a connection to the remote
|
||||
# was established and its initial response was received, and right before generating
|
||||
# and pushing a pack-file.
|
||||
# The operation will be aborted when exiting with a non-zero status.
|
||||
#
|
||||
# The following arguments are provided:
|
||||
#
|
||||
# $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.
|
||||
# $2 - The URL of the remote to push to, like "https://github.com/GitoxideLabs/gitoxide".
|
||||
#
|
||||
# The hook should then read from standard input in a line-by-line fashion and split the following space-separated fields:
|
||||
#
|
||||
# * local ref - the left side of a ref-spec, i.e. "local" of the "local:refs/heads/remote" ref-spec
|
||||
# * local hash - the hash of the commit pointed to by `local ref`
|
||||
# * remote ref - the right side of a ref-spec, i.e. "refs/heads/remote" of the "local:refs/heads/remote" ref-spec
|
||||
# * remote hash - the hash of the commit pointed to by `remote ref`
|
||||
#
|
||||
# In this example, we abort the push if any of the about-to-be-pushed commits have "DELME" in their commit message.
|
||||
#
|
||||
# To enable this hook remove the `.sample` suffix from this file entirely.
|
||||
|
||||
remote="$1"
|
||||
url="$2"
|
||||
|
||||
# Check each commit being pushed
|
||||
while read _local_ref local_hash _remote_ref _remote_hash; do
|
||||
# Skip if the local hash is all zeroes (deletion)
|
||||
zero_sha=$(printf "%0${#local_hash}d" 0)
|
||||
if [ "$local_hash" = "$zero_sha" ]; then
|
||||
continue
|
||||
fi
|
||||
# Get the commit message
|
||||
commit_msg=$(git log --format=%s -n 1 "$local_hash")
|
||||
|
||||
# Check if the commit message contains "DELME"
|
||||
if echo "$commit_msg" | grep -iq "DELME"; then
|
||||
echo "Error: Found commit with 'DELME' in message. Push aborted to $remote ($url) aborted." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# If no commit with "DELME" found, allow the push
|
||||
exit 0
|
||||
40
.git_corrupt_backup/hooks/pre-rebase.sample
Normal file
40
.git_corrupt_backup/hooks/pre-rebase.sample
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
# A sample hook to validate the branches involved in a rebase operation
|
||||
#######################################################################
|
||||
#
|
||||
# This hook is invoked right before `git rebase` starts its work and
|
||||
# prevents anything else to happen by returning a non-zero exit code.
|
||||
#
|
||||
# The following arguments are provided:
|
||||
#
|
||||
# $1 - the branch that contains the commit from which $2 was forked.
|
||||
# $2 - the branch being rebased or no second argument at all if the rebase applies to `HEAD`.
|
||||
#
|
||||
# This example hook aborts the rebase operation if the branch being rebased is not up to date
|
||||
# with the latest changes from the upstream branch, or if there are any uncommitted changes.
|
||||
#
|
||||
# To enable this hook remove the `.sample` suffix from this file entirely.
|
||||
|
||||
upstream_branch=$1
|
||||
if [ "$#" -eq 2 ]; then
|
||||
branch_being_rebased=$2
|
||||
else
|
||||
branch_being_rebased=$(git symbolic-ref --quiet --short HEAD) || exit 0 # ignore rebases on detached heads
|
||||
fi
|
||||
|
||||
# Check if the branch being rebased is behind the upstream branch
|
||||
if git log --oneline ${upstream_branch}..${branch_being_rebased} > /dev/null; then
|
||||
echo "Warning: The branch being rebased (${branch_being_rebased}) is behind the upstream branch (${upstream_branch})." 1>&2
|
||||
echo "Please update your branch before rebasing." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if there are any uncommitted changes
|
||||
if ! git diff-index --quiet HEAD --; then
|
||||
echo "Warning: There are uncommitted changes in your branch ${branch_being_rebased}." 1>&2
|
||||
echo "Please commit or stash your changes before rebasing." 1>&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# All good, let the rebase proceed.
|
||||
exit 0
|
||||
54
.git_corrupt_backup/hooks/prepare-commit-msg.sample
Normal file
54
.git_corrupt_backup/hooks/prepare-commit-msg.sample
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
# A hook called by `git commit` to adjust the commit message right before the user sees it
|
||||
##########################################################################################
|
||||
#
|
||||
# This script is called by `git commit` after commit message was initialized and right before
|
||||
# an editor is launched.
|
||||
#
|
||||
# It receives one to three arguments:
|
||||
#
|
||||
# $1 - the path to the file containing the commit message. It can be edited to change the message.
|
||||
# $2 - the kind of source of the message contained in $1. Possible values are
|
||||
# "message" - a message was provided via `-m` or `-F`
|
||||
# "commit" - `-c`, `-C` or `--amend` was given
|
||||
# "squash" - the `.git/SQUASH_MSG` file exists
|
||||
# "merge" - this is a merge or the `.git/MERGE` file exists
|
||||
# "template" - `-t` was provided or `commit.template` was set
|
||||
# $3 - If $2 is "commit" then this is the hash of the commit.
|
||||
# It can also take other values, best understood by studying the source code at
|
||||
# https://github.com/git/git/blob/aa9166bcc0ba654fc21f198a30647ec087f733ed/builtin/commit.c#L745
|
||||
#
|
||||
# The following example
|
||||
#
|
||||
# To enable this hook remove the `.sample` suffix from this file entirely.
|
||||
|
||||
COMMIT_MSG_FILE=$1
|
||||
|
||||
# Check if the commit message file is empty or already contains a message
|
||||
if [ -s "$COMMIT_MSG_FILE" ]; then
|
||||
# If the commit message is already provided, exit without making any changes.
|
||||
# This can happen if the user provided a message via `-m` or a template.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Retrieve the branch name from the current HEAD commit
|
||||
BRANCH_NAME=$(git symbolic-ref --short HEAD)
|
||||
|
||||
# Generate a default commit message based on the branch name
|
||||
DEFAULT_MSG=""
|
||||
|
||||
case "$BRANCH_NAME" in
|
||||
"feature/*")
|
||||
DEFAULT_MSG="feat: "
|
||||
;;
|
||||
"bugfix/*")
|
||||
DEFAULT_MSG="fix: "
|
||||
;;
|
||||
*)
|
||||
DEFAULT_MSG="chore: "
|
||||
;;
|
||||
esac
|
||||
|
||||
# Set the commit message that will be presented to the user.
|
||||
echo "$DEFAULT_MSG" > "$COMMIT_MSG_FILE"
|
||||
|
||||
BIN
.git_corrupt_backup/index
Normal file
BIN
.git_corrupt_backup/index
Normal file
Binary file not shown.
5
.git_corrupt_backup/info/exclude
Normal file
5
.git_corrupt_backup/info/exclude
Normal file
@@ -0,0 +1,5 @@
|
||||
# This file contains repository-wide exclude patterns that git will ignore.
|
||||
# They are local and will not be shared when pushing or pulling.
|
||||
# When using Rust the following would be typical exclude patterns.
|
||||
# Remove the '# ' prefix to let them take effect.
|
||||
# /target/
|
||||
0
.git_corrupt_backup/logs/HEAD
Normal file
0
.git_corrupt_backup/logs/HEAD
Normal file
0
.git_corrupt_backup/logs/refs/heads/main
Normal file
0
.git_corrupt_backup/logs/refs/heads/main
Normal file
1
.git_corrupt_backup/opencode
Normal file
1
.git_corrupt_backup/opencode
Normal file
@@ -0,0 +1 @@
|
||||
777b68e48a535cf1c87c2b4889b78efc439dd52c
|
||||
28
.git_corrupt_backup/packed-refs
Normal file
28
.git_corrupt_backup/packed-refs
Normal file
@@ -0,0 +1,28 @@
|
||||
# pack-refs with: peeled fully-peeled sorted
|
||||
9693db5919088f5fa91e5d200818ebf566ec9d8f refs/heads/main
|
||||
09f6a116c1001fb295872421af6f61296c68c7ac refs/jj/keep/09f6a116c1001fb295872421af6f61296c68c7ac
|
||||
11bd90f3aeded245e3e57747d22bf95704150198 refs/jj/keep/11bd90f3aeded245e3e57747d22bf95704150198
|
||||
134505e578ab378b0072612f63582ec88fb9cc00 refs/jj/keep/134505e578ab378b0072612f63582ec88fb9cc00
|
||||
1d40cc8da38259f9e3e14e07e9d0fc3acf36b32f refs/jj/keep/1d40cc8da38259f9e3e14e07e9d0fc3acf36b32f
|
||||
2128d0ea288ef40a5f1a4a6a2ef935aca32cb7dc refs/jj/keep/2128d0ea288ef40a5f1a4a6a2ef935aca32cb7dc
|
||||
27b811fe102b61e549576590721f58d3e1a82628 refs/jj/keep/27b811fe102b61e549576590721f58d3e1a82628
|
||||
281b18224ebdb30488b3a632e0e97861af85a0db refs/jj/keep/281b18224ebdb30488b3a632e0e97861af85a0db
|
||||
3bc1faa632fe2bdf18e4b17d137b20e8de73c83d refs/jj/keep/3bc1faa632fe2bdf18e4b17d137b20e8de73c83d
|
||||
6f24966c51a784ecb168bc3455953b41e454ed51 refs/jj/keep/6f24966c51a784ecb168bc3455953b41e454ed51
|
||||
777b68e48a535cf1c87c2b4889b78efc439dd52c refs/jj/keep/777b68e48a535cf1c87c2b4889b78efc439dd52c
|
||||
8a9bd43aa3a2b4840ae0ba5e887815ddbcc36c85 refs/jj/keep/8a9bd43aa3a2b4840ae0ba5e887815ddbcc36c85
|
||||
8c75d691d8dead10c195a160327840f64e463202 refs/jj/keep/8c75d691d8dead10c195a160327840f64e463202
|
||||
923d0b1c1d2f5f5a0c7332d7fc193fb50ed08c25 refs/jj/keep/923d0b1c1d2f5f5a0c7332d7fc193fb50ed08c25
|
||||
9693db5919088f5fa91e5d200818ebf566ec9d8f refs/jj/keep/9693db5919088f5fa91e5d200818ebf566ec9d8f
|
||||
ac2bf616eb6117d6c84f73b652a0a13e15bacbec refs/jj/keep/ac2bf616eb6117d6c84f73b652a0a13e15bacbec
|
||||
bea70e92069cd95bff29f3b86ceaad0a093e53bb refs/jj/keep/bea70e92069cd95bff29f3b86ceaad0a093e53bb
|
||||
c513c11b8030e99decf7ba949b5f677b60111cef refs/jj/keep/c513c11b8030e99decf7ba949b5f677b60111cef
|
||||
ce384ada9570ac1b00bc21a2ea8ed8ffefadb7ab refs/jj/keep/ce384ada9570ac1b00bc21a2ea8ed8ffefadb7ab
|
||||
cec4b35d4d615b101ced81108d6f3ed7b370f72d refs/jj/keep/cec4b35d4d615b101ced81108d6f3ed7b370f72d
|
||||
d44c4504797c3aafc9af7915f834919ba06d71f4 refs/jj/keep/d44c4504797c3aafc9af7915f834919ba06d71f4
|
||||
e30edcdea549a0f66892ae8815628c6c7c2a5abc refs/jj/keep/e30edcdea549a0f66892ae8815628c6c7c2a5abc
|
||||
e595deb42806579768549f2c51601a8c6dfd997d refs/jj/keep/e595deb42806579768549f2c51601a8c6dfd997d
|
||||
eb0e7d3a819b5f23ed3857d243298bf2ee664d0e refs/jj/keep/eb0e7d3a819b5f23ed3857d243298bf2ee664d0e
|
||||
ebb069d0d7e3355f47f4d1ad7d7e8eaa9c2aed6b refs/jj/keep/ebb069d0d7e3355f47f4d1ad7d7e8eaa9c2aed6b
|
||||
ef491813784ea6d7881c4a34912aa21c3e9caac3 refs/jj/keep/ef491813784ea6d7881c4a34912aa21c3e9caac3
|
||||
f173f20b3193c97694db77ba9116e9c657f2f6f8 refs/jj/keep/f173f20b3193c97694db77ba9116e9c657f2f6f8
|
||||
1
.git_corrupt_backup/refs/heads/main
Normal file
1
.git_corrupt_backup/refs/heads/main
Normal file
@@ -0,0 +1 @@
|
||||
6f24966c51a784ecb168bc3455953b41e454ed51
|
||||
Reference in New Issue
Block a user