Merge commit '22cb2f79dd
'
This commit is contained in:
commit
2d9c1f271b
9 changed files with 12 additions and 12 deletions
|
@ -23,7 +23,7 @@
|
|||
#include <stdexcept>
|
||||
|
||||
// The argument must be an expression convertible to bool.
|
||||
// Does nothing if the expression evalutes to true. Otherwise
|
||||
// Does nothing if the expression evaluates to true. Otherwise
|
||||
// it's equivalent to LOG(FATAL).
|
||||
#define CHECK(cond...) \
|
||||
static_cast<void>(0), (!!(cond)) ? static_cast<void>(0) : LOG(FATAL) << #cond << ": "
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
namespace gitstatus {
|
||||
|
||||
// On error, leaves entries unchaged and returns false. Does not throw.
|
||||
// On error, leaves entries unchanged and returns false. Does not throw.
|
||||
//
|
||||
// On success, appends names of files from the specified directory to entries and returns true.
|
||||
// Every appended entry is a null-terminated string. At -1 offset is its d_type. All elements
|
||||
|
|
|
@ -61,7 +61,7 @@ size_t ParseSizeT(const char* s) {
|
|||
|
||||
void PrintUsage() {
|
||||
std::cout << "Usage: gitstatusd [OPTION]...\n"
|
||||
<< "Print machine-readable status of the git repos for directores in stdin.\n"
|
||||
<< "Print machine-readable status of the git repos for directories in stdin.\n"
|
||||
<< "\n"
|
||||
<< "OPTIONS\n"
|
||||
<< " -l, --lock-fd=NUM [default=-1]\n"
|
||||
|
@ -78,7 +78,7 @@ void PrintUsage() {
|
|||
<< " maximum performance.\n"
|
||||
<< "\n"
|
||||
<< " -v, --log-level=STR [default=INFO]\n"
|
||||
<< " Don't write entires to log whose log level is below this. Log levels in\n"
|
||||
<< " Don't write entries to log whose log level is below this. Log levels in\n"
|
||||
<< " increasing order: DEBUG, INFO, WARN, ERROR, FATAL.\n"
|
||||
<< "\n"
|
||||
<< " -r, --repo-ttl-seconds=NUM [default=3600]\n"
|
||||
|
@ -141,7 +141,7 @@ void PrintUsage() {
|
|||
<< "\n"
|
||||
<< " 1. Request ID. Any string. Can be empty.\n"
|
||||
<< " 2. Path to the directory for which git stats are being requested.\n"
|
||||
<< " If the first character is ':', it is removed and the remaning path\n"
|
||||
<< " If the first character is ':', it is removed and the remaining path\n"
|
||||
<< " is treated as GIT_DIR.\n"
|
||||
<< " 3. (Optional) '1' to disable computation of anything that requires reading\n"
|
||||
<< " git index; '0' for the default behavior of computing everything.\n"
|
||||
|
|
|
@ -62,7 +62,7 @@ struct Options : Limits {
|
|||
// If non-negative, send signal 0 to the specified PID when not receiving any requests for one
|
||||
// second; exit if signal sending fails.
|
||||
int parent_pid = -1;
|
||||
// Don't write entires to log whose log level is below this. Log levels in increasing order:
|
||||
// Don't write entries to log whose log level is below this. Log levels in increasing order:
|
||||
// DEBUG, INFO, WARN, ERROR, FATAL.
|
||||
LogLevel log_level = INFO;
|
||||
// Close git repositories that haven't been used for this long. This is meant to release resources
|
||||
|
|
|
@ -155,7 +155,7 @@ IndexStats Repo::GetIndexStats(const git_oid* head, git_config* cfg) {
|
|||
VERIFY(!git_repository_index(&git_index_, repo_)) << GitError();
|
||||
// Query an attribute (doesn't matter which) to initialize repo's attribute
|
||||
// cache. It's a workaround for synchronization bugs (data races) in libgit2
|
||||
// that result from lazy cache initialization without synchrnonization.
|
||||
// that result from lazy cache initialization without synchronization.
|
||||
// Thankfully, subsequent cache reads and writes are properly synchronized.
|
||||
const char* attr;
|
||||
VERIFY(!git_attr_get(&attr, repo_, 0, "x", "x")) << GitError();
|
||||
|
|
|
@ -268,7 +268,7 @@ void TagDb::ParsePack() {
|
|||
}
|
||||
|
||||
if (!std::is_sorted(name2id_.begin(), name2id_.end(), ByName)) {
|
||||
// "sorted" in the header of packed-refs promisses that this won't trigger.
|
||||
// "sorted" in the header of packed-refs promises that this won't trigger.
|
||||
std::sort(name2id_.begin(), name2id_.end(), ByName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue