summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>2018-11-30 14:22:09 +0300
committerIbrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>2018-11-30 16:57:32 +0300
commit8bad0584a57a1ec3f03f9b04b22aeb5c14272724 (patch)
tree79be5ac1bfe25373e876ab396e2082a7b5baf3de
parentan issue of high cohesion is solved (diff)
downloadgitbatch-8bad0584a57a1ec3f03f9b04b22aeb5c14272724.tar.gz
minor change on hash limit and moved the code to more cohesive pkg
-rw-r--r--pkg/gui/commitsview.go4
-rw-r--r--pkg/gui/textstyle.go1
2 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gui/commitsview.go b/pkg/gui/commitsview.go
index 113bdbe..c85282b 100644
--- a/pkg/gui/commitsview.go
+++ b/pkg/gui/commitsview.go
@@ -22,9 +22,9 @@ func (gui *Gui) updateCommits(g *gocui.Gui, entity *git.RepoEntity) error {
for i, c := range entity.Commits {
var body string = ""
if c.CommitType == git.LocalCommit {
- body = cyan.Sprint(c.Hash[:git.Hashlimit])+" "+c.Message
+ body = cyan.Sprint(c.Hash[:hashLength])+" "+c.Message
} else {
- body = yellow.Sprint(c.Hash[:git.Hashlimit])+" "+c.Message
+ body = yellow.Sprint(c.Hash[:hashLength])+" "+c.Message
}
if c.Hash == entity.Commit.Hash {
currentindex = i
diff --git a/pkg/gui/textstyle.go b/pkg/gui/textstyle.go
index 8bee560..048462f 100644
--- a/pkg/gui/textstyle.go
+++ b/pkg/gui/textstyle.go
@@ -22,6 +22,7 @@ var (
maxBranchLength = 15
maxRepositoryLength = 20
+ hashLength = 7
ws = " "
pushable = string(blue.Sprint("↖"))