diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-08-22 13:30:55 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-09-06 20:40:06 +0400 |
commit | ced8d1420a76c13796d951203c2b35540a49b454 (patch) | |
tree | 21f33f82625401b20e7c4e607cc4508d43fa712c /src/iterator.c | |
parent | bb2d305c20d62b10b39d95916d1a172057c26d65 (diff) |
errors: deploy GIT_EBAREREPO usage
Diffstat (limited to 'src/iterator.c')
-rw-r--r-- | src/iterator.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/iterator.c b/src/iterator.c index 92fe67134..e30e11220 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -659,11 +659,8 @@ int git_iterator_for_workdir_range( assert(iter && repo); - if (git_repository_is_bare(repo)) { - giterr_set(GITERR_INVALID, - "Cannot scan working directory for bare repo"); - return -1; - } + if ((error = git_repository__ensure_not_bare(repo, "scan working directory")) < 0) + return error; ITERATOR_BASE_INIT(wi, workdir, WORKDIR); |