X-Git-Url: https://git.armaanb.net/?p=stagit.git;a=blobdiff_plain;f=src%2Fstagit.c;fp=src%2Fstagit.c;h=d99ae191580cafebbee451b168911ff7f64ec45c;hp=ba154d05333c177a711508414be1c288118ca8c2;hb=ff41682701c859b2c10e3be802e6d76b74c5cf12;hpb=37646e890fb91b6c42dc11378ef2d916986d43a7
diff --git a/src/stagit.c b/src/stagit.c
index ba154d0..d99ae19 100644
--- a/src/stagit.c
+++ b/src/stagit.c
@@ -56,6 +56,7 @@ struct commitinfo {
static git_repository *repo;
+static const char *baseurl = ""; /* base URL to make absolute RSS/Atom URI */
static const char *relpath = "";
static const char *repodir;
@@ -784,8 +785,8 @@ printcommitatom(FILE *fp, struct commitinfo *ci)
xmlencode(fp, ci->summary, strlen(ci->summary));
fputs("\n", fp);
}
- fprintf(fp, "\n",
- ci->oid);
+ fprintf(fp, "\n",
+ baseurl, ci->oid);
if (ci->author) {
fputs("\n", fp);
@@ -1234,6 +1235,9 @@ main(int argc, char *argv[])
}
#endif
+ if ((p = getenv("STAGIT_BASEURL")))
+ baseurl = p;
+
if (git_repository_open_ext(&repo, repodir,
GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) {
fprintf(stderr, "%s: cannot open repository\n", argv[0]);