2010/7/22 Junio C Hamano <gitster@xxxxxxxxx>: > 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. 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 -- 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