Allow deleting remote refs

This commit is contained in:
root 2013-02-14 00:00:00 +00:00
parent 543ca86029
commit 8e1246e738
2 changed files with 7 additions and 10 deletions

View file

@ -147,7 +147,6 @@ Yet to be Implemented
..................... .....................
+ Repacking the remote repository + Repacking the remote repository
+ Deleting remote refs
+ Some kind of simple keyring management + Some kind of simple keyring management
See Also See Also

View file

@ -433,6 +433,7 @@ do_push()
# file's hash. The manifest is updated with the pack id. # file's hash. The manifest is updated with the pack id.
# The manifest is encrypted. # The manifest is encrypted.
local remote_has= remote_want= prefix_= suffix_= line_= pack_id= key_= local remote_has= remote_want= prefix_= suffix_= line_= pack_id= key_=
del_hash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ensure_connected ensure_connected
check_recipients check_recipients
@ -459,13 +460,15 @@ do_push()
Branchlist=$(append "$Branchlist" \ Branchlist=$(append "$Branchlist" \
"$(safe_git_rev_parse "$prefix_") $suffix_") "$(safe_git_rev_parse "$prefix_") $suffix_")
else else
: # FIXME delete branch # Mark branch for deletion
Branchlist=$(append "$Branchlist" "$del_hash $suffix_")
fi fi
done <<EOF done <<EOF
$1 $1
EOF EOF
Branchlist=$(xecho "$Branchlist" | sort_stable_k2 | tac | uniq -s 40) Branchlist=$(xecho "$Branchlist" | sort_stable_k2 | tac | uniq -s 40 |
xgrep -v "^$del_hash")
TmpPack_Encrypted="$Localdir/tmp_pack_ENCRYPTED_.$$" TmpPack_Encrypted="$Localdir/tmp_pack_ENCRYPTED_.$$"
TmpObjlist="$Localdir/tmp_packrevlist.$$" TmpObjlist="$Localdir/tmp_packrevlist.$$"
@ -505,17 +508,12 @@ EOF
rm -f "$TmpManifest_Enc" rm -f "$TmpManifest_Enc"
trap - EXIT trap - EXIT
# ok all updates (not deletes) # ok all updates
xecho "$1" | while read line_ xecho "$1" | while read line_
do do
# +src:dst -- remove leading + then split at : # +src:dst -- remove leading + then split at :
splitcolon "${line_#+}" splitcolon "${line_#+}"
if isnull "$prefix_" echo_git "ok $suffix_"
then
echo_git "error $suffix_ delete not supported yet"
else
echo_git "ok $suffix_"
fi
done done
echo_git echo_git