Merge branch 'jk/prune-with-corrupt-refs' into maint
authorJunio C Hamano <gitster@pobox.com>
Sat, 28 Mar 2015 16:33:06 +0000 (09:33 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 28 Mar 2015 16:33:06 +0000 (09:33 -0700)
"git prune" used to largely ignore broken refs when deciding which
objects are still being used, which could spread an existing small
damage and make it a larger one.

* jk/prune-with-corrupt-refs:
refs.c: drop curate_packed_refs
repack: turn on "ref paranoia" when doing a destructive repack
prune: turn on ref_paranoia flag
refs: introduce a "ref paranoia" flag
t5312: test object deletion code paths in a corrupted repository

1  2 
Documentation/git.txt
diff --combined Documentation/git.txt
index 9c7561705198e56ebb48897c30ebebf15a76bc1a,8da85a604ea8464f6a5c6c9da944335381f69853..a2596dc734b9e1175ba940ed591c47a951cb7f02
@@@ -43,10 -43,9 +43,10 @@@ unreleased) version of Git, that is ava
  branch of the `git.git` repository.
  Documentation for older releases are available here:
  
 -* link:v2.3.3/git.html[documentation for release 2.3.3]
 +* link:v2.3.4/git.html[documentation for release 2.3.4]
  
  * release notes for
 +  link:RelNotes/2.3.4.txt[2.3.4],
    link:RelNotes/2.3.3.txt[2.3.3],
    link:RelNotes/2.3.2.txt[2.3.2],
    link:RelNotes/2.3.1.txt[2.3.1],
@@@ -1027,6 -1026,17 +1027,17 @@@ GIT_ICASE_PATHSPECS:
        variable when it is invoked as the top level command by the
        end user, to be recorded in the body of the reflog.
  
+ `GIT_REF_PARANOIA`::
+       If set to `1`, include broken or badly named refs when iterating
+       over lists of refs. In a normal, non-corrupted repository, this
+       does nothing. However, enabling it may help git to detect and
+       abort some operations in the presence of broken refs. Git sets
+       this variable automatically when performing destructive
+       operations like linkgit:git-prune[1]. You should not need to set
+       it yourself unless you want to be paranoid about making sure
+       an operation has touched every ref (e.g., because you are
+       cloning a repository to make a backup).
  
  Discussion[[Discussion]]
  ------------------------