From: Erick Mattos <erick.mattos@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] t2017: redo physical reflog existance check
Date: Fri, 23 Jul 2010 12:04:37 -0300 [thread overview]
Message-ID: <AANLkTin76s-ONFuP+OWdxB5LJNf2D1Du+hKxB2s_WhTa@mail.gmail.com> (raw)
In-Reply-To: <7vsk3bey1e.fsf@alter.siamese.dyndns.org>
2010/7/22 Junio C Hamano <gitster@pobox.com>:
> Erick Mattos <erick.mattos@gmail.com> 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.
I believe you have understood the whole idea of my previous email even
though _words_ means a lot to you. :-1
I meant that that was the code goal. It was the implementation
objective which by itself was the solution chosen for the real
problem.
> 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.
You were cutting off redundancy checks, weren't you? If there is no
reflog file (tested by "test -f"), consequently no reflog (tested by
"rev-parse --verify") and no branch with the chosen name, certainly
someone can create one the "almost used" name, once there is no any
difference from a normal situation.
> [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).
About the late parenthesis: thank God! ;-)
I don't see a need for so much reluctance: "test -f" is not a taboo
inside a script in t folder and the added tests don't change anything
about the design and implementation which IMHO is well fit.
With those two patch lines of mine "--orphan with -l and
core.logAllRefUpdates=false" testing script is finished.
Finally: you are the man in charge so I would really like to enforce
that if you need me to do anything more I will be _really_ glad to
help. I love git and everything good done to it it is done to me too
as one of its daily user.
Best regards
next prev parent reply other threads:[~2010-07-23 15:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 1:46 [PATCH] t2017: redo physical reflog existance check Erick Mattos
2010-07-22 17:35 ` Junio C Hamano
2010-07-22 18:58 ` Erick Mattos
2010-07-23 2:23 ` Junio C Hamano
2010-07-23 15:04 ` Erick Mattos [this message]
2010-08-24 4:03 ` Jonathan Nieder
2010-08-24 16:57 ` Junio C Hamano
2010-08-24 18:57 ` Erick Mattos
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTin76s-ONFuP+OWdxB5LJNf2D1Du+hKxB2s_WhTa@mail.gmail.com \
--to=erick.mattos@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
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 NNTP newsgroup(s).