Introduction
Introduction Statistics Contact Development Disclaimer Help
tseparate getstats from getbyoid: slightly faster - stagit - static git page ge…
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit f843248215c1f87d732b2aec27b1d30c0ceba163
parent 54a8a7c1533ce60e3cbe8539bf1e801225d0fabd
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 23 Jun 2017 13:53:46 +0200
separate getstats from getbyoid: slightly faster
Diffstat:
M stagit.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/stagit.c b/stagit.c
t@@ -208,8 +208,6 @@ commitinfo_getbyoid(const git_oid *id)
opts.flags |= GIT_DIFF_DISABLE_PATHSPEC_MATCH;
if (git_diff_tree_to_tree(&(ci->diff), repo, ci->parent_tree, ci->comm…
goto err;
- if (commitinfo_getstats(ci) == -1)
- goto err;
return ci;
t@@ -575,6 +573,9 @@ writelog(FILE *fp, const git_oid *oid)
break;
if (!(ci = commitinfo_getbyoid(&id)))
break;
+ /* lookup stats: only required here */
+ if (commitinfo_getstats(ci) == -1)
+ goto err;
writelogline(fp, ci);
if (cachefile)
t@@ -596,6 +597,7 @@ writelog(FILE *fp, const git_oid *oid)
writefooter(fpfile);
fclose(fpfile);
}
+err:
commitinfo_free(ci);
}
git_revwalk_free(w);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.