diff mbox series

[1/2] fsck: remove the unused BAD_TAG_OBJECT

Message ID f32ff5dc4eed5bffe8bb0759c408c3d0861ddb50.1666623639.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Document fsck msg ids | expand

Commit Message

John Cai Oct. 24, 2022, 3 p.m. UTC
From: John Cai <johncai86@gmail.com>

The BAD_TAG_OBJECT msg-id is not being used anymore, so we can remove
it.

Signed-off-by: John Cai <johncai86@gmail.com>
---
 fsck.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Junio C Hamano Oct. 24, 2022, 4:57 p.m. UTC | #1
"John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: John Cai <johncai86@gmail.com>
>
> The BAD_TAG_OBJECT msg-id is not being used anymore, so we can remove
> it.

Do you have a ready reference to the change that made it no longer
needed (or stopped detecting the error the message was meant to be
issued against)?


> Signed-off-by: John Cai <johncai86@gmail.com>
> ---
>  fsck.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/fsck.h b/fsck.h
> index 6f801e53b1d..7d99f6ea337 100644
> --- a/fsck.h
> +++ b/fsck.h
> @@ -24,7 +24,6 @@ enum fsck_msg_type {
>  	FUNC(BAD_NAME, ERROR) \
>  	FUNC(BAD_OBJECT_SHA1, ERROR) \
>  	FUNC(BAD_PARENT_SHA1, ERROR) \
> -	FUNC(BAD_TAG_OBJECT, ERROR) \
>  	FUNC(BAD_TIMEZONE, ERROR) \
>  	FUNC(BAD_TREE, ERROR) \
>  	FUNC(BAD_TREE_SHA1, ERROR) \
Junio C Hamano Oct. 24, 2022, 6:16 p.m. UTC | #2
Junio C Hamano <gitster@pobox.com> writes:

> "John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> From: John Cai <johncai86@gmail.com>
>>
>> The BAD_TAG_OBJECT msg-id is not being used anymore, so we can remove
>> it.
>
> Do you have a ready reference to the change that made it no longer
> needed (or stopped detecting the error the message was meant to be
> issued against)?

2175a0c6 (fsck: stop checking tag->tagged, 2019-10-18) stopped
checking the tagged object referred to by a tag object, which the
error message BAD_TAG_OBJECT was about.  Since then the
BAD_TAG_OBJECT message is no longer used.
John Cai Oct. 24, 2022, 6:33 p.m. UTC | #3
Hi Junio,

On 24 Oct 2022, at 14:16, Junio C Hamano wrote:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> "John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
>>
>>> From: John Cai <johncai86@gmail.com>
>>>
>>> The BAD_TAG_OBJECT msg-id is not being used anymore, so we can remove
>>> it.
>>
>> Do you have a ready reference to the change that made it no longer
>> needed (or stopped detecting the error the message was meant to be
>> issued against)?
>
> 2175a0c6 (fsck: stop checking tag->tagged, 2019-10-18) stopped
> checking the tagged object referred to by a tag object, which the
> error message BAD_TAG_OBJECT was about.  Since then the
> BAD_TAG_OBJECT message is no longer used.

Thanks for doing my work for me :)
Jeff King Oct. 24, 2022, 11:39 p.m. UTC | #4
On Mon, Oct 24, 2022 at 02:33:39PM -0400, John Cai wrote:

> >>> From: John Cai <johncai86@gmail.com>
> >>>
> >>> The BAD_TAG_OBJECT msg-id is not being used anymore, so we can remove
> >>> it.
> >>
> >> Do you have a ready reference to the change that made it no longer
> >> needed (or stopped detecting the error the message was meant to be
> >> issued against)?
> >
> > 2175a0c6 (fsck: stop checking tag->tagged, 2019-10-18) stopped
> > checking the tagged object referred to by a tag object, which the
> > error message BAD_TAG_OBJECT was about.  Since then the
> > BAD_TAG_OBJECT message is no longer used.
> 
> Thanks for doing my work for me :)

Thanks for finding this. That commit is mine, and I should have removed
it then. :)

For future reference, I did the same search via:

  git log -SBAD_TAG_OBJECT fsck.c

I find "-S" is great for these kind of "when did this stop getting used"
queries.

-Peff
diff mbox series

Patch

diff --git a/fsck.h b/fsck.h
index 6f801e53b1d..7d99f6ea337 100644
--- a/fsck.h
+++ b/fsck.h
@@ -24,7 +24,6 @@  enum fsck_msg_type {
 	FUNC(BAD_NAME, ERROR) \
 	FUNC(BAD_OBJECT_SHA1, ERROR) \
 	FUNC(BAD_PARENT_SHA1, ERROR) \
-	FUNC(BAD_TAG_OBJECT, ERROR) \
 	FUNC(BAD_TIMEZONE, ERROR) \
 	FUNC(BAD_TREE, ERROR) \
 	FUNC(BAD_TREE_SHA1, ERROR) \