summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse-api/service/maintenanceGitOperations.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/gentoobrowse-api/service/maintenanceGitOperations.cpp b/gentoobrowse-api/service/maintenanceGitOperations.cpp
index 0b909b9..feba275 100644
--- a/gentoobrowse-api/service/maintenanceGitOperations.cpp
+++ b/gentoobrowse-api/service/maintenanceGitOperations.cpp
@@ -48,15 +48,12 @@ namespace Gentoo {
// Set up walker
auto walker = gitSafeGet(git_revwalk_new, git_revwalk_free, repo);
gitSafe(git_revwalk_push, walker.get(), &headCommitOid);
+ gitSafe(git_revwalk_hide, walker.get(), &lastCommitOid);
git_oid oid;
char str[GIT_OID_HEXSZ + 1];
// Walk through revisions
while (!git_revwalk_next(&oid, walker.get())) {
- git_oid_tostr(str, sizeof(str), &oid);
- if (git_oid_equal(&oid, &lastCommitOid)) {
- break;
- }
// Get commit
auto commit = gitSafeGet(git_commit_lookup, git_commit_free, repo, &oid);
@@ -80,6 +77,7 @@ namespace Gentoo {
fs.erase(std::unique(fs.begin(), fs.end()), fs.end());
// Insert commit into DB
+ git_oid_tostr(str, sizeof(str), &oid);
cli->bindParamS(1, str);
auto sig = git_commit_author(commit.get());
cli->bindParamT(2, boost::posix_time::from_time_t(sig->when.time));