From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH v2 4/4] gc: remove broken symrefs
Date: Mon, 05 Oct 2015 15:06:12 -0700 [thread overview]
Message-ID: <xmqq612lx963.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <da381393c0b6174cc07b4333308cf611@dscho.org> (Johannes Schindelin's message of "Mon, 28 Sep 2015 21:58:08 +0200")
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> Oh, I appreciate your feedback. I am actually not all *that* certain
> that removing the broken symref is the correct thing. It is this sort
> of fruitful exchange that allows me to throw out an idea and be
> relatively certain that something better will come out of v3 or v8 of
> the patch series than what I had in mind.
>
> To be honest, the most important outcome is probably 2/4 -- which
> should be enough to fix the issue reported by the Git for Windows
> user. I could adjust the test so that it no longer insists that
> origin/HEAD` be deleted, but still requires that `git gc` succeeds.
>
> I would have no problem to let this sit for a couple of days until
> the final verdict.
... and a few days have passed. I am tempted to do the easy bits
first, discarding the parts that both of us feel iffy for now
without prejudice, keeping the first two commits with a bit of
tweak.
The primary tweak is to t6500 in the first patch, which I retitled
below (and the patch shows s/failure/success/ but in the first step
that only adds a failing test, it would of course expect a failure).
And with "pack-objects: do not get distracted", the test will start
passing.
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh
index b736774..5d7d414 100755
--- a/t/t6500-gc.sh
+++ b/t/t6500-gc.sh
@@ -30,7 +30,7 @@ test_expect_success 'gc -h with invalid configuration' '
test_i18ngrep "[Uu]sage" broken/usage
'
-test_expect_failure 'gc removes broken refs/remotes/<name>/HEAD' '
+test_expect_success 'gc is not aborted due to a stale symref' '
git init remote &&
(
cd remote &&
@@ -39,9 +39,7 @@ test_expect_failure 'gc removes broken refs/remotes/<name>/HEAD' '
git branch -m develop &&
cd ../client &&
git fetch --prune &&
- git gc &&
- git branch --list -r origin/HEAD >actual &&
- test_line_count = 0 actual
+ git gc
)
'
diff --git a/reachable.c b/reachable.c
index 6356ae8..4cfd0de 100644
--- a/reachable.c
+++ b/reachable.c
@@ -28,7 +28,7 @@ static int add_one_ref(const char *path, const unsigned char *sha1, int flag, vo
struct object *object;
if ((flag & REF_ISSYMREF) && (flag & REF_ISBROKEN)) {
- warning("ref is broken: %s", path);
+ warning("symbolic ref is dangling: %s", path);
return 0;
}
next prev parent reply other threads:[~2015-10-05 22:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 9:13 [PATCH 0/4] Fix gc failure when a remote HEAD goes stale Johannes Schindelin
2015-09-24 9:13 ` [PATCH 1/4] gc: demonstrate failure with stale remote HEAD Johannes Schindelin
2015-09-24 9:13 ` [PATCH 2/4] pack-objects: do not get distracted by stale refs Johannes Schindelin
2015-09-24 17:03 ` Jeff King
2015-09-24 9:13 ` [PATCH 3/4] mark_reachable_objects(): optionally collect broken refs Johannes Schindelin
2015-09-24 17:56 ` Jeff King
2015-09-24 9:14 ` [PATCH 4/4] gc: remove " Johannes Schindelin
2015-09-24 17:57 ` Jeff King
2015-09-25 0:08 ` Junio C Hamano
2015-09-25 1:35 ` Jeff King
2015-09-28 14:01 ` [PATCH v2 0/4] Fix gc failure when a remote HEAD goes stale Johannes Schindelin
2015-09-28 14:01 ` [PATCH v2 1/4] gc: demonstrate failure with stale remote HEAD Johannes Schindelin
2015-09-28 14:01 ` [PATCH v2 2/4] pack-objects: do not get distracted by broken symrefs Johannes Schindelin
2015-09-28 14:01 ` [PATCH v2 3/4] mark_reachable_objects(): optionally collect " Johannes Schindelin
2015-09-28 14:02 ` [PATCH v2 4/4] gc: remove " Johannes Schindelin
2015-09-28 18:41 ` Junio C Hamano
2015-09-28 18:49 ` Junio C Hamano
2015-09-28 19:58 ` Johannes Schindelin
2015-10-05 22:06 ` Junio C Hamano [this message]
2015-09-28 19:03 ` Jeff King
2015-09-28 20:05 ` Johannes Schindelin
2015-10-06 13:57 ` [PATCH v3 0/2] Fix gc failure when a remote HEAD goes stale Johannes Schindelin
2015-10-06 13:58 ` [PATCH v3 1/2] gc: demonstrate failure with stale remote HEAD Johannes Schindelin
2015-10-06 13:59 ` [PATCH v3 2/2] pack-objects: do not get distracted by broken symrefs Johannes Schindelin
2015-10-07 17:45 ` Junio C Hamano
2015-10-08 19:15 ` Johannes Schindelin
2015-10-08 19:42 ` Junio C Hamano
2015-10-08 20:10 ` Johannes Schindelin
-- strict thread matches above, loose matches on Subject: below --
2015-10-06 13:59 [PATCH v2 4/4] gc: remove " Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq612lx963.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).