From b0b7bc7d17177098177b75c5b3112594901fb74a Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Tue, 8 Feb 2022 01:48:46 -0300 Subject: Support for commits --- git-hooks/post-receive | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'git-hooks') diff --git a/git-hooks/post-receive b/git-hooks/post-receive index 2b14572..f490cf9 100755 --- a/git-hooks/post-receive +++ b/git-hooks/post-receive @@ -188,7 +188,7 @@ for c in changes: tree = gen_dir / "trees" / str(repo[c.new_value].tree_id) with index.open("w") as f: # TODO - f.write("refview tree") + f.write("refview tree view commit".format("".join("../" for x in c.ref_name if x == "/"), c.new_value)) todocommits.add(repo[c.new_value]) linktarget = get_relative(path, tree) link.unlink(missing_ok=True) @@ -213,7 +213,7 @@ for ref in repo.references: continue with f: # TODO - f.write("refview tree") + f.write("refview tree view commit".format("".join("../" for x in ref.name if x == "/"), ref.peel(pygit2.Commit).id)) todocommits.add(ref.peel(pygit2.Commit)) linktarget = get_relative(path, tree) link.symlink_to(linktarget, target_is_directory=True) @@ -239,7 +239,10 @@ while todocommits: continue with f: # TODO - f.write("commitview tree") + f.write("commitview tree") todotrees.add(c.tree) todocommits.update(c.parents) linktarget = get_relative(path, tree) -- cgit 1.4.1