Skip to content

Commit

Permalink
if found, display an ETH address' ENS name, so address now will be in…
Browse files Browse the repository at this point in the history
… parenthesis
  • Loading branch information
danimesq committed Mar 19, 2024
1 parent c5232cb commit 5395267
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 89 deletions.
16 changes: 8 additions & 8 deletions .gitmeta
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
commit QmWPRYQZsZnjEsM9qJiAAcW4YiVvmaNxUTgGSxMEvPxHJV
commit QmeAq2CSpSVhu4hv1khLZr7FUQ6zFy4MquWd5y6MjmBfZK
Branch: main
Signed-off by: 0xDDfC2e10702d8A781727A34D83B3bb3CA94a3E91
Signature: c25ab97cb5b8f7937cad34913f68c4cab17ca3e072d0eb9fc283b7e874ab2ce279b5005da1ef647ccaf1e7111b792560011331934d72552c07d19bca54a01c2501
Signature: 4b8b81c334c8aa7d275c649c96fd48b61d08c31aceb719e78aea296eda7cc71872852df3e578ce456312ad7978929bb7946eea8f82928b77580e7c51b5dc010001

------------------------------

Expand All @@ -15,12 +15,12 @@ Remote URL: https://github.com/01VCS/git-meta.git
chown -h 1000:1000 './GPTConversation.txt'
chmod 0664 './GPTConversation.txt'
/usr/bin/touch -hcmd "2024-03-18 21:41:36.8343398000 -0300" './GPTConversation.txt'
/usr/bin/touch -hcad "2024-03-18 21:41:36.8343398000 -0300" './GPTConversation.txt'
/usr/bin/touch -hcad "2024-03-18 21:43:59.7979902000 -0300" './GPTConversation.txt'
chown -h 1000:1000 './Tasks.txt'
chmod 0755 './Tasks.txt'
/usr/bin/touch -hcmd "2024-03-18 21:43:08.2395100000 -0300" './Tasks.txt'
/usr/bin/touch -hcad "2024-03-18 21:43:46.5983745000 -0300" './Tasks.txt'
chown -h 1000:1000 './pre-commit'
chmod 0664 './pre-commit'
/usr/bin/touch -hcmd "2024-03-18 21:40:52.9717673000 -0300" './pre-commit'
/usr/bin/touch -hcad "2024-03-18 21:40:52.9597677000 -0300" './pre-commit'
chown -h 1000:1000 './pre-commit.creditgpt'
chmod 0664 './pre-commit.creditgpt'
/usr/bin/touch -hcmd "2024-03-18 21:22:56.9592574000 -0300" './pre-commit.creditgpt'
/usr/bin/touch -hcad "2024-03-18 21:23:32.6547048000 -0300" './pre-commit.creditgpt'
/usr/bin/touch -hcad "2024-03-18 21:43:45.0064210000 -0300" './pre-commit'
6 changes: 4 additions & 2 deletions .gitmeta-cid
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.gitmeta-cid version: r3
Branch: main
Previous commit: QmbK73mHgWJDTGxN2efqhuLdapqtu3heBH9DRpp4vRNYut
Previous commit: QmWPRYQZsZnjEsM9qJiAAcW4YiVvmaNxUTgGSxMEvPxHJV

------------------------------

Files:
pre-commit.creditgpt: QmWG9aGvQerFJ5Q44dNRtCbZscLYRrT9sGhDuoeT86gNmi
GPTConversation.txt: QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH
Tasks.txt: QmUwXWJEV3sM3k49jfqQcVDwCWvRYqsmbPVWSeT5VEuC2c
pre-commit: QmeosV9fkXzo7Pj7jVCQxR9JVHgGNj4ABj7rCrKogrDAPr
74 changes: 0 additions & 74 deletions GPTConversation.txt
Original file line number Diff line number Diff line change
@@ -1,74 +0,0 @@
At line 31 (Previous commit), please add this line:
"Previous commit (legacy git): "
Containing the commit ID of the latest commit!






To add the line "Previous commit (legacy git): " with the commit ID of the latest commit at line 31, you can modify the [Tasks.txt](file:///media/daniella/B/git/nerdy%20DAOs/01VCS/git-meta/Tasks.txt#1%2C1-1%2C1) file as follows:

```Tasks.txt
31|Previous commit (legacy git): QmZRnNdPisCCfCXScMsfMkBR5oLXmgtYHfaH6uygrDuV6B
```





FUCK YOU!

It has nothing to do with Tasks.txt, but with @pre-commit !







To modify the [pre-commit](file:///media/daniella/B/git/nerdy%20DAOs/01VCS/git-meta/pre-commit#21%2C36-21%2C36) script to include the line "Previous commit (legacy git): " with the commit ID of the latest commit at line 31, you can update the script as follows:

```pre-commit
31|echo "Previous commit (legacy git): QmZRnNdPisCCfCXScMsfMkBR5oLXmgtYHfaH6uygrDuV6B"
```





Commit ID from git, (as it says legacy git,right??), not from IPFS Qm hash.









To include the legacy git commit ID in the [pre-commit](file:///media/daniella/B/git/nerdy%20DAOs/01VCS/git-meta/.folderstamp4#53%2C11-53%2C11) script, you can update the script as follows:

```pre-commit
31|echo "Previous commit (legacy git): QmZRnNdPisCCfCXScMsfMkBR5oLXmgtYHfaH6uygrDuV6B"
```





HAVE TO GET THE LATEST COMMIT ID FROM GIT! FROM GIT!









To retrieve the latest commit ID from Git in the [pre-commit](file:///media/daniella/B/git/nerdy%20DAOs/01VCS/git-meta/.folderstamp4#53%2C11-53%2C11) script, you can update the script as follows:

```pre-commit
31|previous_commit_cid=$(git rev-parse HEAD)
```
2 changes: 0 additions & 2 deletions Tasks.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
add the commit md(2?) of previous commit (classic git hash)! ; if found, display an ETH address' ENS name, so address now will be in parenthesis

-? eth.json config at .git/hooks, containing the will to eth-post git CIDs, commit diffs or both (and what network to post to, each)
- local (repo) or global (home folder) settings.json, containing option to run folderstamp on every commit (deactivated by default); global settings overhide repo settings when committing
-
Expand Down
12 changes: 9 additions & 3 deletions pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ fi
if [ ! -f ".gitmeta-cid" ]; then touch .gitmeta-cid; fi

previous_commit_cid=$(ipfs add -q --only-hash .gitmeta-cid)
previous_commit_githash=$(git rev-parse HEAD)

echo ".gitmeta-cid version: r3 " > .gitmeta-cid #use ">" instead of ">>" as a way of emptying .gitmeta-cid before writing new commit data
echo ".gitmeta-cid version: r4 " > .gitmeta-cid #use ">" instead of ">>" as a way of emptying .gitmeta-cid before writing new commit data
echo "Branch: $current_branch" >> .gitmeta-cid
echo "Previous commit: $previous_commit_cid" >> .gitmeta-cid
echo "Previous commit (classic git hash): $previous_commit_githash" >> .gitmeta-cid
echo "" >> .gitmeta-cid && echo "------------------------------" >> .gitmeta-cid && echo "" >> .gitmeta-cid
echo "Files:" >> .gitmeta-cid

Expand All @@ -53,7 +55,12 @@ if [ -f ".git/hooks/.eth" ]; then
# signature=$(ethereal signature sign --nohash --data="$commit_cid" --signer="$eth_account" --passphrase="your_passphrase_here")
echo "🪄 Signing the commit $commit_cid with your choosen ETH address $eth_account..."
signature=$(ethereal signature sign --offline --nohash --data="$commit_cid" --signer="$eth_account" --passphrase="$(jq -r '.passphrase' $HOME/.ethereal.json)" --config $HOME/.ethereal.json)
echo "Signed-off by: $eth_account" >> .gitmeta
enscheck="$(ethereal ens domain get --address=$eth_account)"
if [ "$enscheck" = "Failed to check reverse resolution: not a resolver" ]; then
echo "Signed-off by: $eth_account" >> .gitmeta
else
echo "Signed-off by: $enscheck ($eth_account)" >> .gitmeta
fi
echo "Signature: $signature" >> .gitmeta
echo "🔦 Verifying signature..."
ethereal signature verify --nohash --data="$commit_cid" --signature="$signature" --signer="$eth_account" #from https://github.com/wealdtech/ethereal?tab=readme-ov-file#signature-signer
Expand All @@ -72,4 +79,3 @@ git add .gitmeta
git add .gitmeta-cid
echo "✅ Done. Meta has been preserved!"
echo "🎉 Your snapshot/commit is done!"

0 comments on commit 5395267

Please sign in to comment.