Re: [PATCH] contrib/hooks: add sample post-receive hook using agefile

2014-12-23 Thread John Keeping
On Tue, Dec 23, 2014 at 04:15:15PM +0100, Ferry Huberts wrote:
 
 
 On 23/12/14 15:40, John Keeping wrote:
  +agefile=$(git rev-parse --git-dir)/info/web/last-modified
 
 use $GIT_DIR here instead of rev-parse

githooks(5) doesn't guarantee that GIT_DIR will be set and the fact that
it currently is seems to be an artifact of how old versions of Git work
([0]).

I'd prefer to stick with rev-parse, which is what the example hooks in
git.git use.

[0] http://permalink.gmane.org/gmane.comp.version-control.git/136276

  +
  +mkdir -p $(dirname $agefile) 
  +git for-each-ref \
  +   --sort=-authordate --count=1 \
  +   --format='%(authordate:iso8601)' \
  +   $agefile
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH] contrib/hooks: add sample post-receive hook using agefile

2014-12-23 Thread Ferry Huberts



On 23/12/14 16:48, John Keeping wrote:

On Tue, Dec 23, 2014 at 04:15:15PM +0100, Ferry Huberts wrote:



On 23/12/14 15:40, John Keeping wrote:

+agefile=$(git rev-parse --git-dir)/info/web/last-modified


use $GIT_DIR here instead of rev-parse


githooks(5) doesn't guarantee that GIT_DIR will be set and the fact that
it currently is seems to be an artifact of how old versions of Git work
([0]).

I'd prefer to stick with rev-parse, which is what the example hooks in
git.git use.

[0] http://permalink.gmane.org/gmane.comp.version-control.git/136276



Ok with me.
I did check the man pages and they seem to say that GITDIR is set.
Well, whatever :-)


+
+mkdir -p $(dirname $agefile) 
+git for-each-ref \
+   --sort=-authordate --count=1 \
+   --format='%(authordate:iso8601)' \
+   $agefile


--
Ferry Huberts
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH 1/4] ui-shared: remove toggle_ssdiff arg to cgit_commit_link()

2014-12-23 Thread Jason A. Donenfeld
Merged, thanks.
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH 4/4] ui-diff: add stat only diff type

2014-12-23 Thread Jason A. Donenfeld
Merged.
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH 1/1] filter: fix libravatar email-filter https issue

2014-12-23 Thread Jason A. Donenfeld
Merging this, because it appears correct and necessary, but...  *ugh*.

Does upstream have an official stance on why they don't make src=// easy?
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH] git: update to v2.2.1

2014-12-23 Thread Jason A. Donenfeld
Merged, thanks.
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH v2] Remove trailing slash after remove-suffix

2014-12-23 Thread Jason A. Donenfeld
This is a good solution. Thanks for taking care of this Lukas. Merged.
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH] Use split_ident_line() in parse_user()

2014-12-23 Thread Jason A. Donenfeld
On Wed, Dec 17, 2014 at 5:19 AM, Lukas Fleischer c...@cryptocrack.de
wrote:

 Use Git's built-in ident line splitting algorithm instead of
 reimplementing it. This does not only simplify the code but also makes
 sure that cgit is consistent with Git when it comes to author parsing.


Thank heavens!

 +   email_len = ident.mail_end - ident.mail_begin;
 +   *email = xmalloc(strlen() + email_len + strlen(\0));
 +   sprintf(*email, %.*s, email_len, ident.mail_begin);
 +


strlen(\0) -- isn't the null superfluous? Cleanup and resubmit?
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH] filter: add support for owner-filter

2014-12-23 Thread Jason A. Donenfeld
Hi Chris,

I like this patch, and I intend to merge it. Would you take care of John's
nitpicks, and rebase this against the current master, and I'll merge?

Sorry for the delay.

Thanks,
Jason
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH 3/3] ui-shared: add rel-vcs microformat links to HTML header

2014-12-23 Thread Jason A. Donenfeld
Merged this entire series. Cool to implement rel-vcs. Thanks.
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH] match other common markdown file extensions

2014-12-23 Thread Jason A. Donenfeld
Seems reasonable enough. Merged.
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH 1/1] git: use xz compressed archive for download

2014-12-23 Thread Jason A. Donenfeld
Merged a variant of this.

xz is less commonly deployed, but I think modernization is a good thing in
this regard, so rolling with it.
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: RFE: Show just diff summary

2014-12-23 Thread Jason A. Donenfeld
Ahh yes, of course -- John has done it, and it's been merged
here: ddfaef6bb28e697491b25bff5a7b260d44ce6ccf
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit


Re: [PATCH] Use split_ident_line() in parse_user()

2014-12-23 Thread Lukas Fleischer
On Wed, 24 Dec 2014 at 02:57:45, Jason A. Donenfeld wrote:
 On Wed, Dec 17, 2014 at 5:19 AM, Lukas Fleischer c...@cryptocrack.de
 wrote:
 
  Use Git's built-in ident line splitting algorithm instead of
  reimplementing it. This does not only simplify the code but also makes
  sure that cgit is consistent with Git when it comes to author parsing.
 
 
 Thank heavens!
 
  +   email_len = ident.mail_end - ident.mail_begin;
  +   *email = xmalloc(strlen() + email_len + strlen(\0));
  +   sprintf(*email, %.*s, email_len, ident.mail_begin);
  +
 
 
 strlen(\0) -- isn't the null superfluous? Cleanup and resubmit?

I think this is even wrong because it means the buffer won't be large
enough to hold the terminating null character. Will resubmit.
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit