tadd abbreviated commit hash to submodule file - stagit - [fork] customized bui… | |
git clone git://src.adamsgaard.dk/stagit | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 2262b0ac3d6ddfd692903acb555166c016721fe8 | |
parent 4a4c9d316e3643219a7225668c955dd262d666fc | |
Author: Oscar Benedito <[email protected]> | |
Date: Mon, 16 Nov 2020 23:24:32 +0100 | |
add abbreviated commit hash to submodule file | |
Diffstat: | |
M stagit.c | 7 +++++-- | |
1 file changed, 5 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/stagit.c b/stagit.c | |
t@@ -990,7 +990,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *path) | |
git_object *obj = NULL; | |
git_off_t filesize; | |
const char *entryname; | |
- char filepath[PATH_MAX], entrypath[PATH_MAX]; | |
+ char filepath[PATH_MAX], entrypath[PATH_MAX], oid[8]; | |
size_t count, i, lc; | |
int r, ret; | |
t@@ -1044,7 +1044,10 @@ writefilestree(FILE *fp, git_tree *tree, const char *pa… | |
fprintf(fp, "<tr><td>m---------</td><td><a href=\"%sfi… | |
relpath); | |
xmlencode(fp, entrypath, strlen(entrypath)); | |
- fputs("</a></td><td class=\"num\" align=\"right\"></td… | |
+ fputs("</a> @ ", fp); | |
+ git_oid_tostr(oid, sizeof(oid), git_tree_entry_id(entr… | |
+ xmlencode(fp, oid, strlen(oid)); | |
+ fputs("</td><td class=\"num\" align=\"right\"></td></t… | |
} | |
} | |