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 3131#include "tree.h"
3232#include "wildmatch.h"
3333#include "write-or-die.h"
34+ #include "pager.h"
3435
3536static struct decoration name_decoration = { "object names" };
3637static int decoration_loaded ;
@@ -411,16 +412,6 @@ void show_decorations(struct rev_info *opt, struct commit *commit)
411412 strbuf_release (& sb );
412413}
413414
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-
424415void fmt_output_subject (struct strbuf * filename ,
425416 const char * subject ,
426417 struct rev_info * info )
@@ -464,7 +455,7 @@ void fmt_output_email_subject(struct strbuf *sb, struct rev_info *opt)
464455 strbuf_addf (sb , "Subject: [%s%s%0*d/%d] " ,
465456 opt -> subject_prefix ,
466457 * opt -> subject_prefix ? " " : "" ,
467- digits_in_number (opt -> total ),
458+ decimal_width (opt -> total ),
468459 opt -> nr , opt -> total );
469460 } else if (opt -> total == 0 && opt -> subject_prefix && * opt -> subject_prefix ) {
470461 strbuf_addf (sb , "Subject: [%s] " ,
You can’t perform that action at this time.
0 commit comments