stagit

add abbreviated commit hash to submodule file

Oscar Benedito contact@arjunchoudhary.com

commit: 66400ca parent: 93d81c9
1 files changed, 5 insertions(+), 2 deletions(-)
Mstagit.c+5-2
M · stagit.c +5, -2
 1@@ -977,7 +977,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
 2 	git_object *obj = NULL;
 3 	git_off_t filesize;
 4 	const char *entryname;
 5-	char filepath[PATH_MAX], entrypath[PATH_MAX];
 6+	char filepath[PATH_MAX], entrypath[PATH_MAX], oid[8];
 7 	size_t count, i, lc;
 8 	int r, ret;
 9 
10@@ -1031,7 +1031,10 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
11 			fprintf(fp, "<tr><td>m---------</td><td><a href=\"%sfile/.gitmodules.html\">",
12 				relpath);
13 			xmlencode(fp, entrypath, strlen(entrypath));
14-			fputs("</a></td><td class=\"num\" align=\"right\"></td></tr>\n", fp);
15+			fputs("</a> @ ", fp);
16+			git_oid_tostr(oid, sizeof(oid), git_tree_entry_id(entry));
17+			xmlencode(fp, oid, strlen(oid));
18+			fputs("</td><td class=\"num\" align=\"right\"></td></tr>\n", fp);
19 		}
20 	}
21