diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2013-11-23 14:39:53 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-12-09 15:55:11 +0100 |
| commit | f21051297cc698644ea0dc9c7122ec944dba2863 (patch) | |
| tree | b94a20b868860f84c5a674bbada254e789f4e43a /src/refdb_fs.c | |
| parent | 8d5ec9106afbca346a8def84ef20de0a7ba2240a (diff) | |
| download | libgit2-f21051297cc698644ea0dc9c7122ec944dba2863.tar.gz | |
refs: expose has_log() on the backend
The frontend used to look at the file directly, but that's obviously not
the right thing to do. Expose it on the backend and use that function
instead.
Diffstat (limited to 'src/refdb_fs.c')
| -rw-r--r-- | src/refdb_fs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c index 2cdea8274..e9ce648e1 100644 --- a/src/refdb_fs.c +++ b/src/refdb_fs.c @@ -1278,6 +1278,17 @@ cleanup: return ret; } +static int refdb_reflog_fs__has_log(git_refdb_backend *_backend, const char *name) +{ + refdb_fs_backend *backend; + + assert(_backend && name); + + backend = (refdb_fs_backend *) _backend; + + return has_reflog(backend->repo, name); +} + static int refdb_reflog_fs__read(git_reflog **out, git_refdb_backend *_backend, const char *name) { int error = -1; @@ -1608,6 +1619,7 @@ int git_refdb_backend_fs( backend->parent.del = &refdb_fs_backend__delete; backend->parent.rename = &refdb_fs_backend__rename; backend->parent.compress = &refdb_fs_backend__compress; + backend->parent.has_log = &refdb_reflog_fs__has_log; backend->parent.ensure_log = &refdb_reflog_fs__ensure_log; backend->parent.free = &refdb_fs_backend__free; backend->parent.reflog_read = &refdb_reflog_fs__read; |
