Re: [PATCH] t2017: redo physical reflog existance check

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

 



Erick Mattos <erick.mattos@xxxxxxxxx> writes:

> To make the new orphan branch ready to have a reflog on that config
> was as simple as creating a "touch file" for reflog.  This is the goal
> achieved by code.

I have to say that you are somewhat confused about the _goal_ then.  touch
is not a goal, it is means to a goal.

It does not matter how you implement the user visible effect, be it a
creation of an empty file, or some other means [*1*].  What matters is
that the user won't get a reflog for a branch that really didn't get
created and must-fail "rev-parse --verify" test checks that.

Another thing that could matter would be that future actions that want to
create a reflog for the same branch (perhaps after the user switches to
'master', another attempt is made to create eta with "checkout -b eta") or
another branch with a similar or related name (say "eta/real") are not get
broken by whatever you do to implement the "we want to create a reflog
when a ref is actually made but not right now" feature.  Perhaps the right
way to test that would be to actually try to run such operations and make
sure they do not fail.


[Footnote]

*1* For example, you could have implemented the feature by adding a config
item in ".git/config: [branch "eta"] need-to-create-reflog", and taught
refs.c::update_ref() to pay attention to it (I am not saying that it would
be a better implementation).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]