Skip to content

Commit

Permalink
More branch validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
acaudwell committed Mar 25, 2014
1 parent 54a16d1 commit 06727d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/formats/git.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ std::string GitCommitLog::logCommand() {
"--reverse --raw --encoding=UTF-8 "
"--no-renames";

if(!gGourceSettings.git_branch.empty()) {
log_command += " ";
log_command += gGourceSettings.git_branch;
}

if(!gGourceSettings.start_date.empty()) {
log_command += " --since ";
log_command += gGourceSettings.start_date;
Expand All @@ -47,6 +42,11 @@ std::string GitCommitLog::logCommand() {
log_command += gGourceSettings.stop_date;
}

if(!gGourceSettings.git_branch.empty()) {
log_command += " ";
log_command += gGourceSettings.git_branch;
}

return log_command;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gource_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc

if(!entry->hasValue()) conffile.missingValueException(entry);

Regex branch_regex("^[/\\w.,;_=+{}\\[\\]-]+$");
Regex branch_regex("^(?!-)[/\\w.,;_=+{}\\[\\]-]+$");

std::string branch = entry->getString();

Expand Down

0 comments on commit 06727d8

Please sign in to comment.