diff options
author | Eric Wong <e@80x24.org> | 2017-02-16 23:26:01 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-02-16 23:26:01 +0000 |
commit | e7dc3224ad0b497da6ef242e3a9c612c5702514e (patch) | |
tree | 1ac252a5fe4b83bc430cb208cee08edb6d9aa631 /lib/PublicInbox/RepoGitDiffCommon.pm | |
parent | 1f34241e5dc94417d49e2c728e0f2ea04ddc39b0 (diff) | |
download | public-inbox-e7dc3224ad0b497da6ef242e3a9c612c5702514e.tar.gz |
The "HEAD" symbolic ref is rarely changed, so memoize it for now and avoid exposing it in URLs.
Diffstat (limited to 'lib/PublicInbox/RepoGitDiffCommon.pm')
-rw-r--r-- | lib/PublicInbox/RepoGitDiffCommon.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/RepoGitDiffCommon.pm b/lib/PublicInbox/RepoGitDiffCommon.pm index 3e3ea4ee..67adca68 100644 --- a/lib/PublicInbox/RepoGitDiffCommon.pm +++ b/lib/PublicInbox/RepoGitDiffCommon.pm @@ -162,6 +162,7 @@ sub DSTATE_LINES () { 2 } sub git_diff_sed_init ($) { my ($req) = @_; $req->{dbuf} = ''; + $req->{-tip} = $req->{-repo}->tip; $req->{ndiff} = $req->{nchg} = $req->{nadd} = $req->{ndel} = 0; $req->{dstate} = DSTATE_INIT; } |