summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-10-28 09:47:19 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-10-28 09:47:19 (GMT)
commit72f1fa78418fb39c234b176b25095a44e1970a4a (patch)
tree4d4e423602e5ae72dee351911666325245f91e4b
parent87cad97c4decd0c7c69af1951cd3f8f4a211e6d8 (diff)
downloadeeshow-72f1fa78418fb39c234b176b25095a44e1970a4a.zip
eeshow-72f1fa78418fb39c234b176b25095a44e1970a4a.tar.gz
eeshow-72f1fa78418fb39c234b176b25095a44e1970a4a.tar.bz2
file/git-file.c (related_same_repo, related_only_repo): copy commit, too
Else, we'll have an undefined vcs_git->commit, and crash.
-rw-r--r--file/git-file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/file/git-file.c b/file/git-file.c
index 6cd8a07..10da07f 100644
--- a/file/git-file.c
+++ b/file/git-file.c
@@ -361,6 +361,7 @@ static bool related_same_repo(struct vcs_git *vcs_git)
const struct vcs_git *related = vcs_git->related;
vcs_git->repo = related->repo;
+ vcs_git->commit = related->commit;
vcs_git->tree = related->tree;
return access_file_data(vcs_git, vcs_git->name);
@@ -407,6 +408,7 @@ static bool related_only_repo(struct vcs_git *vcs_git)
}
vcs_git->repo = related->repo;
+ vcs_git->commit = related->commit;
vcs_git->tree = related->tree;
if (!access_file_data(vcs_git, tmp)) {