File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 31
31
#include "tree.h"
32
32
#include "wildmatch.h"
33
33
#include "write-or-die.h"
34
+ #include "pager.h"
34
35
35
36
static struct decoration name_decoration = { "object names" };
36
37
static int decoration_loaded ;
@@ -411,16 +412,6 @@ void show_decorations(struct rev_info *opt, struct commit *commit)
411
412
strbuf_release (& sb );
412
413
}
413
414
414
- static unsigned int digits_in_number (unsigned int number )
415
- {
416
- unsigned int i = 10 , result = 1 ;
417
- while (i <= number ) {
418
- i *= 10 ;
419
- result ++ ;
420
- }
421
- return result ;
422
- }
423
-
424
415
void fmt_output_subject (struct strbuf * filename ,
425
416
const char * subject ,
426
417
struct rev_info * info )
@@ -464,7 +455,7 @@ void fmt_output_email_subject(struct strbuf *sb, struct rev_info *opt)
464
455
strbuf_addf (sb , "Subject: [%s%s%0*d/%d] " ,
465
456
opt -> subject_prefix ,
466
457
* opt -> subject_prefix ? " " : "" ,
467
- digits_in_number (opt -> total ),
458
+ decimal_width (opt -> total ),
468
459
opt -> nr , opt -> total );
469
460
} else if (opt -> total == 0 && opt -> subject_prefix && * opt -> subject_prefix ) {
470
461
strbuf_addf (sb , "Subject: [%s] " ,
You can’t perform that action at this time.
0 commit comments