Skip to content

Commit 60b7ee3

Browse files
committed
workflow test
1 parent 4b0afa0 commit 60b7ee3

File tree

4 files changed

+44
-5
lines changed

4 files changed

+44
-5
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on: [push]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Install Prerequisits
8+
run: |
9+
sudo apt-get update
10+
sudo apt-get install -y asciidoc python3-pygit2
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- name: Test
16+
run: |
17+
git config --global user.email "[email protected]"
18+
git config --global user.name "Test User"
19+
gpg --batch --gen-key .github/workflows/testkey.conf
20+
make KEY:=$(gpg --list-keys --with-colons | awk -F: '/^pub/ {print $5; exit}') test

.github/workflows/testkey.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
%no-protection
2+
Key-Type: RSA
3+
Key-Length: 2048
4+
Subkey-Type: RSA
5+
Subkey-Length: 2048
6+
Name-Real: Test User
7+
Name-Email: [email protected]
8+
Expire-Date: 0
9+
%commit

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export PATH := $(CURDIR):$(PATH)
1+
export GIT_EXEC_PATH := $(CURDIR):$(shell git --exec-path)
22
export MANPATH := $(CURDIR):$(MANPATH)
33
VERBOSE :=
44
TESTREPO := $(CURDIR)
@@ -25,14 +25,14 @@ test: man
2525
git ls-remote $(TESTREPO)
2626
git incrypt init $(REPO) $(KEY)
2727
git -C $(TESTREPO) fetch $(REPO) || git -C $(TESTREPO) incrypt trust $(REPO)
28-
git -C $(TESTREPO) push $(VERBOSE) $(REPO) master~2:refs/heads/master
28+
git -C $(TESTREPO) push $(VERBOSE) $(REPO) HEAD~2:refs/heads/master
2929
git clone $(VERBOSE) $(REPO) tst
3030
git -C $(TESTREPO) push $(VERBOSE) $(REPO) v0.9.0
3131
git -C tst pull $(VERBOSE)
32-
git -C $(TESTREPO) push $(VERBOSE) $(REPO) master
33-
git -C tst pull $(VERBOSE)
34-
git -C $(TESTREPO) push $(VERBOSE) --all $(REPO)
32+
git -C $(TESTREPO) push $(VERBOSE) $(REPO) HEAD:master
3533
git -C tst pull $(VERBOSE)
34+
git -C $(TESTREPO) push $(VERBOSE) -f --all $(REPO)
35+
git -C tst pull --no-rebase -X theirs --no-edit $(VERBOSE)
3636
git ls-remote crypt
3737
git -C tst ls-remote $(REPO)
3838
git ls-remote tst

git-incrypt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ class CryptRepo:
303303
collector.insert('0', cryptobjs[obj.id],
304304
pygit2.enums.FileMode.BLOB)
305305
colid = collector.write()
306+
sys.stderr.write(f'||| {cryptmap}\n')
307+
sys.stderr.flush()
306308
cryptmap[str(obj.id)] = self.meta.secretcommit(
307309
colid, [cryptmap[c] for c in obj.parent_ids]
308310
if obj.type == pygit2.enums.ObjectType.COMMIT
@@ -317,6 +319,14 @@ class CryptRepo:
317319
colobjs = CryptRepo._revlist(
318320
CryptRepo.RevMode.PARENT, [r[4].id for r in xrefs if r[4]],
319321
cryptmap)
322+
sys.stderr.write('vvv\n')
323+
for i in CryptRepo._revlist(CryptRepo.RevMode.ALL, colobjs):
324+
sys.stderr.write(f'<<< {i}\n')
325+
sys.stderr.write('===\n')
326+
for i in colobjs:
327+
sys.stderr.write(f'>>> {i}\n')
328+
sys.stderr.write('^^^\n')
329+
sys.stderr.flush()
320330
cryptobjs = {}
321331
self._progress_for('Encrypting objects',
322332
CryptRepo._revlist(CryptRepo.RevMode.ALL, colobjs),

0 commit comments

Comments
 (0)