Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Garbage collect quietly
Browse files Browse the repository at this point in the history
  • Loading branch information
dabrahams committed Jan 15, 2013
1 parent 832ad6c commit 43bcda5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gitutil.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -669,12 +669,13 @@ void Repository::write_branches()


void Repository::garbage_collect() void Repository::garbage_collect()
{ {
log.info("Garbage Collecting");
if (repo_name.empty()) { if (repo_name.empty()) {
std::system("git config gc.autopacklimit 0"); std::system("git config gc.autopacklimit 0");
std::system("git config loose.compression 0"); std::system("git config loose.compression 0");


log.newline(); log.newline();
std::system("git gc"); std::system("git gc --quiet");
} else { } else {
std::system((std::string("git --git-dir=\"") + repo_name + std::system((std::string("git --git-dir=\"") + repo_name +
"\" config gc.autopacklimit 0").c_str()); "\" config gc.autopacklimit 0").c_str());
Expand All @@ -683,7 +684,7 @@ void Repository::garbage_collect()


log.newline(); log.newline();
std::system((std::string("git --git-dir=\"") + repo_name + std::system((std::string("git --git-dir=\"") + repo_name +
"\" gc").c_str()); "\" gc --quiet").c_str());
} }
} }


Expand Down

0 comments on commit 43bcda5

Please sign in to comment.