[PATCH 2/4] pack-objects: do not get distracted by stale refs
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Sep 24, 2015, 09:13 UTC
- Message-ID
- <a3a883ce9d7a8bf4220beb640caca5bed0f7d492.1443085919.git.johannes.schindelin@gmx.de>
- In-Reply-To
- <cover.1443085919.git.johannes.schindelin@gmx.de>
It is quite possible for, say, a remote HEAD to become stale, e.g. when the default branch was renamed.
We should still be able to pack our objects when such a thing happens; simply ignore invalid refs (because they cannot matter for the packing process anyway).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- builtin/pack-objects.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 1c63f8f..ef2f794 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2499,6 +2499,7 @@ static void get_object_list(int ac, const char **av) int flags = 0; init_revisions(&revs, NULL); + revs.ignore_missing = 1; save_commit_buffer = 0; setup_revisions(ac, av, &revs, NULL);
-- 2.5.2.windows.2