git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [JGIT PATCH 1/2] Issue 23: Resolve tag^0 as tag^{commit}

From
Imran M Yousuf <imran@smartitengineering.com>
Date
Sep 12, 2008, 01:51 UTC
Message-ID
<9e85b2570809111851y756fdb3en2c17c69bf5ac444e@mail.gmail.com>
In-Reply-To
<20080912000007.GA31931@diku.dk>
On Fri, Sep 12, 2008 at 6:00 AM, Jonas Fonseca <fonseca@diku.dk> wrote:
Show 18 quoted lines
>> Second, the testcase in the second patch fails on my machine.
>>
>> testDerefTaggedTagTree(org.spearce.jgit.lib.T0008_testparserev)
>> junit.framework.ComparisonFailure: expected:<[269e1253bad5c247c6bde37aa48ae1e03138206c]> but was:<[be83157b4ffe650d728ba4f98ad47b623b0d0c20]>
>>       at junit.framework.Assert.assertEquals(Assert.java:81)
>>       at junit.framework.Assert.assertEquals(Assert.java:87)
>>       at org.spearce.jgit.lib.T0008_testparserev.testDerefTaggedTagTree(T0008_testparserev.java:123)
>
> I reran all the test before formatting the patch, but after doing some
> last minut changes. When I run all the tests using maven (inside
> NetBeans or from the command line) it tells me:
>
>        Tests run: 428, Failures: 0, Errors: 0, Skipped: 0
>
> From the output it looks like the tests in the files named T000* are
> never run. However, where the breakage is (could be my setup) I don't
> know. Imran?
>

Hmm, I will have to check it. Will come back with some feedback after checking. Usually if a class is a TestCase then it should have run.

Show 21 quoted lines
> Anyway, for now I will just run the single test specifically. Perhaps I
> should just put this into the same patch. Anyway, the following should
> fix it.
>
> diff --git a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0008_testparserev.java b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0008_testparserev.java
> index 2a1a4ad..1fc73b4 100644
> --- a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0008_testparserev.java
> +++ b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0008_testparserev.java
> @@ -117,7 +117,7 @@ public void testDerefTagIssue23() throws IOException {
>        }
>
>        public void testDerefTaggedTagTree() throws IOException {
> -               assertEquals("269e1253bad5c247c6bde37aa48ae1e03138206c",db.resolve("refs/tags/C").name());
> +               assertEquals("be83157b4ffe650d728ba4f98ad47b623b0d0c20",db.resolve("refs/tags/C").name());
>                assertEquals("d86a2aada2f5e7ccf6f11880bfb9ab404e8a8864",db.resolve("refs/tags/C^{commit}").name());
>                assertEquals("856ec208ae6cadac25a6d74f19b12bb27a24fe24",db.resolve("refs/tags/C^{tree}").name());
>        }
>
> --
> Jonas Fonseca
>
-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Previous: Jonas FonsecaNext: Jonas Fonseca
Message 4 of 10 in “Issue 23: Resolve tag^0 as tag^{commit}”
  1. 1/2 Issue 23: Resolve tag^0 as tag^{commit}Jonas Fonseca, Sep 11, 2008
  2. Robin RosenbergSep 11, 2008
  3. Jonas FonsecaSep 12, 2008
  4. Imran M YousufSep 12, 2008
  5. Configure the maven surefire plugin to specifically include all testsJonas Fonseca, Sep 12, 2008
  6. Shawn O. PearceSep 12, 2008
  7. Robin RosenbergSep 12, 2008
  8. 1/3 Fix IncorrectObjectTypeException thrown for incorrect ^{blob}Jonas Fonseca, Sep 12, 2008
  9. 2/3 Fix off by one distance during resolving of commit~NJonas Fonseca, Sep 12, 2008
  10. 3/3 Tests and fixes for dereferencing tags in Repository.resolve()Jonas Fonseca, Sep 12, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.