stagit

custom fork of stagit
Index Commits Files Refs README LICENSE
commit f8228f1bc155e929e4f586f82b75129ab69f91f3
parent 5eff1497063c0a4b4f6d115aadc3aa2cf14d7354
Author: mjkloeckner <martin.cachari@gmail.com>
Date:   Mon, 26 Dec 2022 18:49:10 -0300

print tab as spaces and Makefile fix

Diffstat:
MMakefile | 8++++----
Mstagit.c | 2++
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@@ -18,7 +18,7 @@ STAGIT_CPPFLAGS = -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE
 
 # Uncomment to enable workaround for older libgit2 which don't support this
 # option. This workaround will be removed in the future *pinky promise*.
-STAGIT_CFLAGS += -DGIT_OPT_SET_OWNER_VALIDATION=-1
+# STAGIT_CFLAGS += -DGIT_OPT_SET_OWNER_VALIDATION=-1
 
 SRC = \
     stagit.c\
@@ -35,7 +35,7 @@ MAN1 = \
     stagit-index.1
 DOC = \
     LICENSE\
-    README
+    README.md
 HDR = compat.h
 
 COMPATOBJ = \
@@ -88,7 +88,7 @@ install: all
         logo.png\
         example_create.sh\
         example_post-receive.sh\
-        README\
+        README.md\
         ${DESTDIR}${DOCPREFIX}
     # installing manual pages.
     mkdir -p ${DESTDIR}${MANPREFIX}/man1
@@ -105,7 +105,7 @@ uninstall:
         ${DESTDIR}${DOCPREFIX}/logo.png\
         ${DESTDIR}${DOCPREFIX}/example_create.sh\
         ${DESTDIR}${DOCPREFIX}/example_post-receive.sh\
-        ${DESTDIR}${DOCPREFIX}/README
+        ${DESTDIR}${DOCPREFIX}/README.md
     -rmdir ${DESTDIR}${DOCPREFIX}
     # removing manual pages.
     for m in ${MAN1}; do rm -f ${DESTDIR}${MANPREFIX}/man1/$$m; done
diff --git a/stagit.c b/stagit.c
@@ -21,6 +21,7 @@
 
 /* #define DATE_SHORT_FMT    "%Y-%m-%d %H:%M" */
 #define DATE_SHORT_FMT    "%H:%M %d-%m-%Y"
+#define TABWIDTH    4
 
 struct deltainfo {
     git_patch *patch;
@@ -426,6 +427,7 @@ xmlencodeline(FILE *fp, const char *s, size_t len)
         case '\'': fputs("&#39;",  fp); break;
         case '&':  fputs("&amp;",  fp); break;
         case '"':  fputs("&quot;", fp); break;
+        case '\t': fprintf(fp, "%*c", TABWIDTH, ' '); break;
         case '\r': break; /* ignore CR */
         case '\n': break; /* ignore LF */
         default:   putc(*s, fp);