Skip to content

Commit

Permalink
Change 'changes' to pending
Browse files Browse the repository at this point in the history
  • Loading branch information
axdiamond committed Nov 17, 2019
1 parent 30b5d01 commit 0cd4e35
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct Info {
last_change: String,
repo: String,
commits: String,
changes: String,
pending: String,
repo_size: String,
number_of_lines: usize,
license: String,
Expand Down Expand Up @@ -192,11 +192,11 @@ impl std::fmt::Display for Info {
)?;
}

if !self.disable_fields.changes && self.changes != "" {
if !self.disable_fields.pending && self.pending != "" {
write_buf(
&mut buf,
&self.get_formatted_info_label("Changes: ", color),
&self.changes,
&self.get_formatted_info_label("Pending: ", color),
&self.pending,
)?;
}

Expand Down Expand Up @@ -313,7 +313,7 @@ impl Info {
let (git_v, git_user) = Info::get_git_info(workdir_str);
let version = Info::get_version(workdir_str)?;
let commits = Info::get_commits(workdir_str, no_merges)?;
let changes = Info::get_pending_changes(workdir_str)?;
let pending = Info::get_pending_pending(workdir_str)?;
let repo_size = Info::get_packed_size(workdir_str)?;
let last_change = Info::get_last_change(workdir_str)?;
let creation_date = Info::get_creation_time(workdir_str)?;
Expand All @@ -334,7 +334,7 @@ impl Info {
last_change,
repo: config.repository_url,
commits,
changes,
pending,
repo_size,
number_of_lines,
license: project_license,
Expand Down Expand Up @@ -513,7 +513,7 @@ impl Info {
}
}

fn get_pending_changes(dir: &str) -> Result<String> {
fn get_pending_pending(dir: &str) -> Result<String> {
let output = Command::new("git")
.arg("-C")
.arg(dir)
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub struct InfoFieldOn {
last_change: bool,
repo: bool,
commits: bool,
changes: bool,
pending: bool,
lines_of_code: bool,
size: bool,
license: bool,
Expand All @@ -76,7 +76,7 @@ enum InfoFields {
LastChange,
Repo,
Commits,
Changes,
Pending,
LinesOfCode,
Size,
License,
Expand Down Expand Up @@ -260,7 +260,7 @@ Possible values: [{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}]",
InfoFields::Authors => disable_fields.authors = true,
InfoFields::LastChange => disable_fields.last_change = true,
InfoFields::Repo => disable_fields.repo = true,
InfoFields::Changes => disable_fields.changes = true,
InfoFields::Pending => disable_fields.pending = true,
InfoFields::Commits => disable_fields.commits = true,
InfoFields::LinesOfCode => disable_fields.lines_of_code = true,
InfoFields::Size => disable_fields.size = true,
Expand Down

0 comments on commit 0cd4e35

Please sign in to comment.