chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
71a8d0f
)
commitid: in Small with commitid, show start rather than end of commitid
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 10 Feb 2016 01:50:12 +0000
(
01:50
+0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 10 Feb 2016 01:50:12 +0000
(
01:50
+0000)
commitid.scad.pl
patch
|
blob
|
history
diff --git
a/commitid.scad.pl
b/commitid.scad.pl
index 983a4abc08abf4a5b8423705bb59058357f35d5b..35bc341ff4e2043fd64c4228d70548943211ae65 100755
(executable)
--- a/
commitid.scad.pl
+++ b/
commitid.scad.pl
@@
-538,11
+538,11
@@
sub do_git () {
if (defined($git_count)) {
my $smallstr = rjustt($sz, $git_count, $git_dirty);
if (defined($git_count)) {
my $smallstr = rjustt($sz, $git_count, $git_dirty);
- if (defined($git_object) && $sz >= length($git_count) + 3) {
- $smallstr = $git_object;
- $smallstr
.= ($git_dirty || ' ');
- $smallstr .= $git_count;
-
$smallstr = rjustt($sz, $smallstr)
;
+ my $forgitobj = $sz - length($git_count) - 1;
+ if (defined($git_object) && $forgitobj >= 2) {
+ $smallstr
= rjustt($forgitobj, $git_object).
+ ($git_dirty || ' ').
+
$git_count
;
}
genform_plusq("Small$sz", $smallstr);
}
}
genform_plusq("Small$sz", $smallstr);
}