summaryrefslogtreecommitdiff
path: root/file/file.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-04 07:11:13 -0300
committerWerner Almesberger <werner@almesberger.net>2016-09-04 07:19:45 -0300
commitba7b2c25799e9615705e146f18a74a0389108e6c (patch)
tree6972000191be3e6fd8dbcac95eec01ee07cf5c7f /file/file.c
parentce034adb60b431114abf49b4aceb39e96b48c682 (diff)
downloadeeshow-ba7b2c25799e9615705e146f18a74a0389108e6c.tar.gz
eeshow-ba7b2c25799e9615705e146f18a74a0389108e6c.tar.bz2
eeshow-ba7b2c25799e9615705e146f18a74a0389108e6c.zip
file/git-hist.c (vcs_git_try): check if the file really exists in the repo
Else, eeshow may load some huge revision history for an uncommitted file, just to report that it can't be found.
Diffstat (limited to 'file/file.c')
-rw-r--r--file/file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/file/file.c b/file/file.c
index 80c19a7..7b7ebca 100644
--- a/file/file.c
+++ b/file/file.c
@@ -166,6 +166,14 @@ static void file_init(struct file *file, const char *name,
}
+bool file_open_vcs(struct file *file, const char *name)
+{
+ file_init(file, name, NULL);
+ file->vcs = open_vcs(file);
+ return file->vcs;
+}
+
+
bool file_open(struct file *file, const char *name, const struct file *related)
{
file_init(file, name, related);