<p dir="ltr"><br>
On Jan 7, 2014 5:52 PM, &quot;Olof Johansson&quot; &lt;<a href="mailto:olof.johansson@axis.com">olof.johansson@axis.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On 14-01-07 16:02 +0100, Richard Purdie wrote:<br>
&gt; &gt; On Tue, 2014-01-07 at 15:46 +0100, Olof Johansson wrote:<br>
&gt; &gt; &gt; I agree with your reasoning with regards to not needing a<br>
&gt; &gt; &gt; fallback for Andrei&#39;s patch, but my patch tries to first resolve<br>
&gt; &gt; &gt; refs/tags/&lt;tag&gt; (fully qualified) and then falls back to try<br>
&gt; &gt; &gt; refs/heads/&lt;branch&gt;. The reason for this is that ls-remote will<br>
&gt; &gt; &gt; return things like refs/heads/lalala/&lt;tag&gt; if you only do<br>
&gt; &gt; &gt; ls-remote &lt;tag&gt;.<br>
&gt; &gt;<br>
&gt; &gt; Can we somehow anchor the expression instead e.g. refs/*/&lt;xxx&gt;^{}<br>
&gt;<br>
&gt; Sure, we can do ls-remote without any arguments and parse the<br>
&gt; output. But this won&#39;t make the patch easier in any way. One less<br>
&gt; fork though.<br>
&gt;<br>
&gt; &gt; &gt; My attempt was also to break out the tasks into simple,<br>
&gt; &gt; &gt; atomic(-ish) functions that would later be easier to write unit<br>
&gt; &gt; &gt; tests for. You complained on IRC that changes to the fetcher<br>
&gt; &gt; &gt; usually comes back to bite you. I believe increased unit test<br>
&gt; &gt; &gt; coverage on low level functions, as a compliment to the existing<br>
&gt; &gt; &gt; more high level suite, can be beneficial in this regard.<br>
&gt; &gt;<br>
&gt; &gt; I believe that my complaint could also be addressed by ensuring the high<br>
&gt; &gt; level tests had more coverage of the variety of supported use cases. In<br>
&gt; &gt; this case a range of tags of differing types, branches and hanging<br>
&gt; &gt; commits would have helped ensure the changes to the fetcher didn&#39;t break<br>
&gt; &gt; things.<br>
&gt;<br>
&gt; Yes, that probably possible. *I* find low level unit tests easier<br>
&gt; to work with, and I wanted to do what I could to alleviate the<br>
&gt; situation; making sure that (at least) our use cases are covered<br>
&gt; by automated tests.<br>
&gt;<br>
&gt; &gt; I&#39;m less keen on forcing an atom like set of functions on the fetcher<br>
&gt; &gt; just for the purposes of the test suite. Sorry I was unclear on that, I<br>
&gt; &gt; guess different people have different understandings of what increased<br>
&gt; &gt; coverage would mean.<br>
&gt;<br>
&gt; I find it easier to work in functions with limited scopes, with<br>
&gt; clear purposes --- with or without unittests (unittests being<br>
&gt; preferable, obviously). But then again, I&#39;m not the maintainer,<br>
&gt; so your preferences are more important :-).<br>
&gt;<br>
&gt; &gt; &gt; Also, if you are holding things off, I would really appreciate<br>
&gt; &gt; &gt; you letting us know so that we can make appropriate workarounds<br>
&gt; &gt; &gt; if needed (as in this case, where we have had to supsend testing<br>
&gt; &gt; &gt; on master :-().<br>
&gt; &gt;<br>
&gt; &gt; Well, it wasn&#39;t a conscious decision so much as the holidays came along<br>
&gt; &gt; and I ran out of time to look at it. I&#39;m trying to get this resolved now<br>
&gt; &gt; since obviously various people are hitting the problem cases.<br>
&gt;<br>
&gt; I really appreciate the hard work you are doing :-).</p>
<p dir="ltr">Me too :-)</p>
<p dir="ltr">I agree that we really need to fix this as we are breaking layers out in the wild with this issue.</p>
<p dir="ltr">@olof sorry for duplicate email.</p>
<p dir="ltr">ag<br>
</p>