From ea2f8521c49df0f10de5e6d8a97842c0df7c47b0 Mon Sep 17 00:00:00 2001 From: Oscar Benedito Date: Thu, 10 Sep 2020 01:11:53 +0200 Subject: Add tracked commit short OID to submodules --- stagit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stagit.c b/stagit.c index 63c2ddc..ca6bc70 100644 --- a/stagit.c +++ b/stagit.c @@ -1065,7 +1065,12 @@ writefilestree(FILE *fp, git_tree *tree, const char *path) fprintf(fp, "m---------", relpath); xmlencode(fp, entrypath, strlen(entrypath)); - fputs("\n", fp); + fputs(" @ ", fp); + const git_oid* oid = git_tree_entry_id(entry); + char oidstr[8]; + git_oid_tostr(oidstr, sizeof(oidstr), oid); + fprintf(fp, "%s\n", + oidstr); } } -- cgit v1.2.3