A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/GitoxideLabs/gitoxide/commit/73a30f8a91fcf5db1244a9a5388e05f4349b0c2e below:

Fix CI by not using `-t bad` · GitoxideLabs/gitoxide@73a30f8 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+33

-3

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+33

-3

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

@@ -298,6 +298,7 @@ jobs:

298 298

libssl-dev

299 299

libstdc++6:${{ matrix.runner-arch }} # To support external 64-bit Node.js for actions.

300 300

pkgconf

301 +

python3-minimal

301 302

)

302 303

dpkg --add-architecture ${{ matrix.runner-arch }}

303 304

apt-get update

Original file line number Diff line number Diff line change

@@ -10,6 +10,35 @@ function baseline() {

10 10

}>> baseline.git

11 11

}

12 12 13 +

function loose-obj() {

14 +

# Read content from stdin, compute header and hash, write compressed object

15 +

script=$(cat <<'EOF'

16 +

import sys

17 +

import hashlib

18 +

import zlib

19 +

import os

20 + 21 +

type = sys.argv[1]

22 +

objects_dir = sys.argv[2]

23 +

content = sys.stdin.buffer.read()

24 +

header = f"{type} {len(content)}\0".encode()

25 +

full = header + content

26 +

sha1 = hashlib.sha1(full).hexdigest()

27 +

compressed = zlib.compress(full)

28 + 29 +

bucket = f"{objects_dir}/" + sha1[:2]

30 +

filename = sha1[2:]

31 + 32 +

os.makedirs(bucket, exist_ok=True)

33 +

with open(f"{bucket}/{filename}", "wb") as f:

34 +

f.write(compressed)

35 + 36 +

print(sha1)

37 +

EOF

38 +

)

39 +

python3 -c "$script" "$@"

40 +

}

41 + 13 42

# The contents of this file is based on https://github.com/git/git/blob/8168d5e9c23ed44ae3d604f392320d66556453c9/t/t1512-rev-parse-disambiguation.sh#L38

14 43

git init --bare blob.prefix

15 44

(

@@ -31,11 +60,11 @@ git init --bare blob.bad

31 60

cd blob.bad

32 61

# Both have the prefix "bad0"

33 62

# Maybe one day we have a test to see how disambiguation reporting deals with this.

34 -

echo xyzfaowcoh | git hash-object -t bad -w --stdin --literally

35 -

echo xyzhjpyvwl | git hash-object -t bad -w --stdin --literally

63 +

echo xyzfaowcoh | loose-obj bad objects

64 +

echo xyzhjpyvwl | loose-obj bad objects

36 65

baseline "bad0"

37 66 38 -

echo 1bbfctrkc | git hash-object -t bad -w --stdin --literally

67 +

echo 1bbfctrkc | loose-obj bad objects

39 68

baseline "e328"

40 69

baseline "e328^{object}"

41 70

)

You can’t perform that action at this time.


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

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

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