Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request git-commit-id#549 from matevarga/master
Browse files Browse the repository at this point in the history
Explicitly hides commit sigs (add "--no-show-signature" command line option which requires git v2.10.0-rc0 or newer) git-commit-id#548
  • Loading branch information
TheSnoozer authored Mar 19, 2021
2 parents 4a982a9 + 3819cd9 commit 5130b38
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/src/main/java/pl/project13/core/NativeGitProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,41 +230,41 @@ public boolean isDirty() throws GitCommitIdExecutionException {

@Override
public String getCommitAuthorName() throws GitCommitIdExecutionException {
return runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%an " + evaluateOnCommit);
return runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%an --no-show-signature " + evaluateOnCommit);
}

@Override
public String getCommitAuthorEmail() throws GitCommitIdExecutionException {
return runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%ae " + evaluateOnCommit);
return runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%ae --no-show-signature " + evaluateOnCommit);
}

@Override
public String getCommitMessageFull() throws GitCommitIdExecutionException {
return runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%B " + evaluateOnCommit);
return runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%B --no-show-signature " + evaluateOnCommit);
}

@Override
public String getCommitMessageShort() throws GitCommitIdExecutionException {
return runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%s " + evaluateOnCommit);
return runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%s --no-show-signature " + evaluateOnCommit);
}

@Override
public String getCommitTime() throws GitCommitIdExecutionException {
String value = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%ct " + evaluateOnCommit);
String value = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%ct --no-show-signature " + evaluateOnCommit);
SimpleDateFormat smf = getSimpleDateFormatWithTimeZone();
return smf.format(Long.parseLong(value) * 1000L);
}

@Override
public String getCommitAuthorTime() throws GitCommitIdExecutionException {
String value = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%at " + evaluateOnCommit);
String value = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%at --no-show-signature " + evaluateOnCommit);
SimpleDateFormat smf = getSimpleDateFormatWithTimeZone();
return smf.format(Long.parseLong(value) * 1000L);
}

@Override
public String getCommitCommitterTime() throws GitCommitIdExecutionException {
String value = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%ct " + evaluateOnCommit);
String value = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "log -1 --pretty=format:%ct --no-show-signature " + evaluateOnCommit);
SimpleDateFormat smf = getSimpleDateFormatWithTimeZone();
return smf.format(Long.parseLong(value) * 1000L);
}
Expand Down

0 comments on commit 5130b38

Please sign in to comment.