From: Johannes Schindelin Date: Tue, 06 Oct 2015 13:57:58 GMT Subject: [PATCH v3 0/2] Fix gc failure when a remote HEAD goes stale Message-ID: In-Reply-To: There has been a report in the Git for Windows project that gc fails sometimes: https://github.com/git-for-windows/git/issues/423 It turns out that there are cases when a remote HEAD can go stale and it is not the user's fault at all. It can happen, for example, if the active branch in the remote repository gets renamed. Thanks to Junio and Peff for their really valuable sanity check. Interdiff re: v2 after the diffstat (3/4 and 4/4 were dropped, I am no longer removing the broken symrefs). Johannes Schindelin (2): gc: demonstrate failure with stale remote HEAD pack-objects: do not get distracted by broken symrefs reachable.c | 8 +++++++- t/t6500-gc.sh | 13 +++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/builtin/prune.c b/builtin/prune.c index 337b12a..10b03d3 100644 --- a/builtin/prune.c +++ b/builtin/prune.c @@ -6,7 +6,6 @@ #include "reachable.h" #include "parse-options.h" #include "progress.h" -#include "refs.h" static const char * const prune_usage[] = { N_("git prune [-n] [-v] [--expire