summaryrefslogtreecommitdiffstats
path: root/modules/git
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git')
-rw-r--r--modules/git/commit.go4
-rw-r--r--modules/git/repo_compare.go1
2 files changed, 0 insertions, 5 deletions
diff --git a/modules/git/commit.go b/modules/git/commit.go
index e65782912f..5e492e27ea 100644
--- a/modules/git/commit.go
+++ b/modules/git/commit.go
@@ -529,10 +529,6 @@ func GetCommitFileStatus(repoPath, commitID string) (*CommitFileStatus, error) {
// GetFullCommitID returns full length (40) of commit ID by given short SHA in a repository.
func GetFullCommitID(repoPath, shortID string) (string, error) {
- if len(shortID) >= 40 {
- return shortID, nil
- }
-
commitID, err := NewCommand("rev-parse", shortID).RunInDir(repoPath)
if err != nil {
if strings.Contains(err.Error(), "exit status 128") {
diff --git a/modules/git/repo_compare.go b/modules/git/repo_compare.go
index 683ac7a7ee..5bc7f9ca5a 100644
--- a/modules/git/repo_compare.go
+++ b/modules/git/repo_compare.go
@@ -89,7 +89,6 @@ func (repo *Repository) GetCompareInfo(basePath, baseBranch, headBranch string)
return nil, err
}
compareInfo.NumFiles = len(strings.Split(stdout, "\n")) - 1
-
return compareInfo, nil
}