remote.<name>.gcrypt-participants overwritten on pull
This commit is contained in:
parent
5dcc77f507
commit
c55e1fdd9b
1 changed files with 21 additions and 1 deletions
|
@ -337,6 +337,18 @@ PRIVENCRYPT()
|
||||||
rungpg --compress-algo none --trust-model=always -se "$@"
|
rungpg --compress-algo none --trust-model=always -se "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GET_RECIPIENTS()
|
||||||
|
{
|
||||||
|
keys_id=$(rungpg --list-only --no-default-keyring --secret-keyring /dev/null \
|
||||||
|
$1 2>&1 | awk -c '/gpg/{ gsub(",","",$8 ); print $8 }')
|
||||||
|
for k in $keys_id; do
|
||||||
|
fp=$(rungpg --with-colons --fingerprint $k | awk -F: -c '/^fpr/{print $10}')
|
||||||
|
fingerprints="$fingerprints $fp"
|
||||||
|
echo -n "$fp "
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# $1 is the match for good signature, $2 is the textual signers list
|
# $1 is the match for good signature, $2 is the textual signers list
|
||||||
PRIVDECRYPT()
|
PRIVDECRYPT()
|
||||||
{
|
{
|
||||||
|
@ -466,7 +478,7 @@ read_config()
|
||||||
ensure_connected()
|
ensure_connected()
|
||||||
{
|
{
|
||||||
local manifest_= r_repoid= r_name= url_frag= r_sigmatch= r_signers= \
|
local manifest_= r_repoid= r_name= url_frag= r_sigmatch= r_signers= \
|
||||||
tmp_manifest=
|
tmp_manifest= r_participants=
|
||||||
|
|
||||||
if isnonnull "$Did_find_repo"
|
if isnonnull "$Did_find_repo"
|
||||||
then
|
then
|
||||||
|
@ -513,6 +525,10 @@ ensure_connected()
|
||||||
manifest_=$(PRIVDECRYPT "$r_sigmatch" "$r_signers" < "$tmp_manifest") &&
|
manifest_=$(PRIVDECRYPT "$r_sigmatch" "$r_signers" < "$tmp_manifest") &&
|
||||||
isnonnull "$manifest_" ||
|
isnonnull "$manifest_" ||
|
||||||
echo_die "Failed to decrypt manifest!"
|
echo_die "Failed to decrypt manifest!"
|
||||||
|
|
||||||
|
# Getting repository participants parsing GPG file recipients
|
||||||
|
r_participants=$(GET_RECIPIENTS "$tmp_manifest")
|
||||||
|
echo_info $r_participants
|
||||||
rm -f "$tmp_manifest"
|
rm -f "$tmp_manifest"
|
||||||
|
|
||||||
filter_to @Refslist "$Hex40 *" "$manifest_"
|
filter_to @Refslist "$Hex40 *" "$manifest_"
|
||||||
|
@ -540,6 +556,10 @@ ensure_connected()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
isnull "$r_name" || git config "remote.$r_name.gcrypt-id" "$r_repoid"
|
isnull "$r_name" || git config "remote.$r_name.gcrypt-id" "$r_repoid"
|
||||||
|
isnull "$r_participants" || (git config \
|
||||||
|
"remote.$r_name.gcrypt-participants" \
|
||||||
|
"$r_participants" && \
|
||||||
|
git config "remote.$r_name.gcrypt-publish-participants" true)
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 is the hash type (SHA256 etc)
|
# $1 is the hash type (SHA256 etc)
|
||||||
|
|
Loading…
Reference in a new issue