diff options
author | root <root@localhost> | 2013-02-14 00:00:00 +0000 |
---|---|---|
committer | root <root@localhost> | 2013-02-14 00:00:00 +0000 |
commit | 8e1246e7388313779e93ce6d58e45da3eb64239e (patch) | |
tree | 71c2af9ffbc0965c455dfc8763403bbeac91020f | |
parent | 543ca8602909cdbfe1ac25c304bd3418756bab76 (diff) | |
download | git-remote-gcrypt-8e1246e7388313779e93ce6d58e45da3eb64239e.zip git-remote-gcrypt-8e1246e7388313779e93ce6d58e45da3eb64239e.tar.gz git-remote-gcrypt-8e1246e7388313779e93ce6d58e45da3eb64239e.tar.bz2 |
Allow deleting remote refs
-rw-r--r-- | README.rst | 1 | ||||
-rwxr-xr-x | git-remote-gcrypt | 16 |
2 files changed, 7 insertions, 10 deletions
@@ -147,7 +147,6 @@ Yet to be Implemented ..................... + Repacking the remote repository -+ Deleting remote refs + Some kind of simple keyring management See Also diff --git a/git-remote-gcrypt b/git-remote-gcrypt index 49fed5f..be3a4a7 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -433,6 +433,7 @@ do_push() # file's hash. The manifest is updated with the pack id. # The manifest is encrypted. local remote_has= remote_want= prefix_= suffix_= line_= pack_id= key_= + del_hash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ensure_connected check_recipients @@ -459,13 +460,15 @@ do_push() Branchlist=$(append "$Branchlist" \ "$(safe_git_rev_parse "$prefix_") $suffix_") else - : # FIXME delete branch + # Mark branch for deletion + Branchlist=$(append "$Branchlist" "$del_hash $suffix_") fi done <<EOF $1 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_.$$" TmpObjlist="$Localdir/tmp_packrevlist.$$" @@ -505,17 +508,12 @@ EOF rm -f "$TmpManifest_Enc" trap - EXIT - # ok all updates (not deletes) + # ok all updates xecho "$1" | while read line_ do # +src:dst -- remove leading + then split at : splitcolon "${line_#+}" - if isnull "$prefix_" - then - echo_git "error $suffix_ delete not supported yet" - else - echo_git "ok $suffix_" - fi + echo_git "ok $suffix_" done echo_git |