<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/ui-refs.c, branch v1.0</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>http://git.cetero.st/cgit/atom/ui-refs.c?h=v1.0</id>
<link rel='self' href='http://git.cetero.st/cgit/atom/ui-refs.c?h=v1.0'/>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/'/>
<updated>2016-02-08T13:22:21Z</updated>
<entry>
<title>ui: show ages in the originator's timezone</title>
<updated>2016-02-08T13:22:21Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2016-01-19T19:33:05Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=f2a901d2e1db5217d6890b26c6dc1ec119505d02'/>
<id>urn:sha1:f2a901d2e1db5217d6890b26c6dc1ec119505d02</id>
<content type='text'>
This affects the tooltip showing the full time and the case when a date
is sufficiently old to be shown in full rather than as an offset.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>ui-shared: remove "format" from cgit_print_age()</title>
<updated>2016-02-08T13:19:33Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2016-01-19T19:33:01Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=57ea1aa2a5eab7f6aba702b3366fe4dcc72124f6'/>
<id>urn:sha1:57ea1aa2a5eab7f6aba702b3366fe4dcc72124f6</id>
<content type='text'>
We never use any format other than FMT_SHORTDATE, so move that into the
function.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>ui-refs: remove useless null check</title>
<updated>2015-10-09T08:54:48Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2015-10-08T22:23:59Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=198a4404b937033cf2cf2b054242df4e81ef3075'/>
<id>urn:sha1:198a4404b937033cf2cf2b054242df4e81ef3075</id>
<content type='text'>
There is no way that "tag" can be null here.

Coverity-id: 13950
Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>refs: move layout to page function</title>
<updated>2015-08-14T13:46:51Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2015-08-14T11:47:16Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=6d39dd1914dd0a904c606b079e8ef0f1643f2266'/>
<id>urn:sha1:6d39dd1914dd0a904c606b079e8ef0f1643f2266</id>
<content type='text'>
Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>log: allow users to follow a file</title>
<updated>2015-08-12T14:57:46Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2015-08-12T14:55:28Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=30304d8156a72ffc95e45e1aa9407319b81bd253'/>
<id>urn:sha1:30304d8156a72ffc95e45e1aa9407319b81bd253</id>
<content type='text'>
Teach the "log" UI to behave in the same way as "git log --follow", when
given a suitable instruction by the user.  The default behaviour remains
to show the log without following renames, but the follow behaviour can
be activated by following a link in the page header.

Follow is not the default because outputting merges in follow mode is
tricky ("git log --follow" will not show merges).  We also disable the
graph in follow mode because the commit graph is not simplified so we
end up with frequent gaps in the graph and many lines that do not
connect with any commits we're actually showing.

We also teach the "diff" and "commit" UIs to respect the follow flag on
URLs, causing the single-file version of these UIs to detect renames.
This feature is needed only for commits that rename the path we're
interested in.

For commits before the file has been renamed (i.e. that appear later in
the log list) we change the file path in the links from the log to point
to the old name; this means that links to commits always limit by the
path known to that commit.  If we didn't do this we would need to walk
down the log diff'ing every commit whenever we want to show a commit.
The drawback is that the "Log" link in the top bar of such a page links
to the log limited by the old name, so it will only show pre-rename
commits.  I consider this a reasonable trade-off since the "Back" button
still works and the log matches the path displayed in the top bar.

Since following renames requires running diff on every commit we
consider, I've added a knob to the configuration file to globally
enable/disable this feature.  Note that we may consider a large number
of commits the revision walking machinery no longer performs any path
limitation so we have to examine every commit until we find a page full
of commits that affect the target path or something related to it.

Suggested-by: René Neumann &lt;necoro@necoro.eu&gt;
Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>Avoid non-ANSI function declarations</title>
<updated>2015-03-09T16:38:30Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2015-03-08T16:32:16Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=e3d3fffdd447cdb4551549faae65bae5353a2cab'/>
<id>urn:sha1:e3d3fffdd447cdb4551549faae65bae5353a2cab</id>
<content type='text'>
Sparse says things like:

	warning: non-ANSI function declaration of function 'calc_ttl'

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>tag: reference with "h" instead of "id"</title>
<updated>2015-01-19T16:52:10Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2015-01-15T22:18:14Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=c422b9b3d5938a4d386533604d4c0dbedfcb2b6d'/>
<id>urn:sha1:c422b9b3d5938a4d386533604d4c0dbedfcb2b6d</id>
<content type='text'>
When clicking on "log" from a tag we end up showing the log of whatever
branch we used to reach the tag.  If the tag doesn't point onto a branch
then the tagged commit won't appear in this output.

By linking to tags with the head parameter instead of the "id" parameter
the log link will show the log of the tag.  This is clearly desirable
when the tag has been reached from the refs UI and changing the
behaviour for tag decorations makes them match branch decorations where
log -&gt; decoration -&gt; log shows the log of the decoration.

Reported-by: Ferry Huberts &lt;mailings@hupie.com&gt;
Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>ui-shared: remove toggle_ssdiff arg to cgit_commit_link()</title>
<updated>2014-12-13T11:38:42Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2014-10-05T09:59:02Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=eeddb5bc0905d4728001a111a9b1eb60ecccf9bd'/>
<id>urn:sha1:eeddb5bc0905d4728001a111a9b1eb60ecccf9bd</id>
<content type='text'>
This argument is never used with a value other than zero, so remove it
and simplify the code.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>git: update for git 2.0</title>
<updated>2014-06-28T13:14:56Z</updated>
<author>
<name>Christian Hesse</name>
<email>mail@eworm.de</email>
</author>
<published>2014-05-29T15:35:46Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=79c985e13c10b498c3ea62f4607c2e2a460c3b10'/>
<id>urn:sha1:79c985e13c10b498c3ea62f4607c2e2a460c3b10</id>
<content type='text'>
prefixcmp() and suffixcmp() have been remove, functionality is now
provided by starts_with() and ends_with(). Retrurn values have been
changed, so instead of just renaming we have to fix logic.
Everything else looks just fine.
</content>
</entry>
<entry>
<title>ui-refs: simplify cmp_age logic</title>
<updated>2014-02-26T15:57:15Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-02-26T15:57:15Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=493061102653ac6483dc3c9649c726318e2488b6'/>
<id>urn:sha1:493061102653ac6483dc3c9649c726318e2488b6</id>
<content type='text'>
The check in parse_user that eventually makes it into committer_date and
tagger_date is:

else if (mode == 3 &amp;&amp; isdigit(*p)) {
    *date = atol(p);
    mode++;
}

Since isdigit('-') is always false, date will never be negative. Thus
the sign of this function:

static int cmp_age(int age1, int age2)
{
    if (age1 != 0 &amp;&amp; age2 != 0)
        return age2 - age1;

    if (age1 == 0 &amp;&amp; age2 == 0)
        return 0;

    if (age1 == 0)
        return +1;

    return -1;
}

Will always be the same as the sign of this function:

static inline int cmp_age(int age1, int age2)
{
    return age2 - age1;
}

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Idea-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
</feed>
