Re: [PATCH v5 1/2] untracked-cache: test untracked-cache-bypassing behavior with -uall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 30, 2022 at 6:39 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Tao Klerks <tao@xxxxxxxxxx> writes:
>
> > Sorry, I'm not completely sure whether my comment was misleading, or
> > whether I'm misunderstanding your feedback.
> >
> > The test added here does not test "desirable" behavior from an
> > end-user functional perspective, but it does test behavior that is
> > working "as-designed" as of many years ago.
>
> Is it "as-designed", or just "left buggy"?
>
> I somehow had an impression that you meant the latter, and it would
> be our aspirational goal to eventually fix it.  And for such case,
> it would be better to write the test body to show what the command
> should do, which would make the test fail with today's Git, and mark
> it as test_expect_failure (which is not an ideal mechanism to prepare
> for a future fix, but that is what we have now and should use, until
> a better alternative being worked on is finished).
>
> But if it is "as-designed, some users may find it suboptimal or
> confusing or with any other negative adjectives, but it is too late
> to change now and more importantly it is unthinkable to change it
> because existing tools and users do depend on the current behaviour",
> then what you did is perfectly fine.
>

Heh, the answer is in-between: there certainly is an aspiration that
someone figure out how to have the single untracked cache structure
safely support both -uall and -unormal modes with the same data... but
it's not clear that this is possible, and it's certainly not planned.

I don't feel comfortable saying "we should fix this", and that's not
the intent of this test - its intent is to say "this is how it is
(currently) designed to work. If you accidentally change it, be sure
that you are changing the design, not just accidentally changing
behavior and potentially/probably introducing a bug".

I'll try with this updated comment, using the term "current design" to
make the distinction:

# Bypassing the untracked cache here is not desirable from an
# end-user perspective, but is expected in the current design.
# The untracked cache data stored for a -unormal run cannot be
# correctly used in a -uall run - it would yield incorrect output.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux