diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-06 16:16:46 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-07 08:33:27 +0100 |
commit | 62a617dc683c1e73eebd0e1b6209f76748e67ed4 (patch) | |
tree | 5893fe2b801d96825582d8a461b50e80f4a2a43a /src/checkout.h | |
parent | f1a7906fdf0657fba88449bdab07237847f36670 (diff) | |
download | libgit2-62a617dc683c1e73eebd0e1b6209f76748e67ed4.tar.gz |
iterator: submodules are determined by an index or treecmn/submodule-and-dir
We cannot know from looking at .gitmodules whether a directory is a
submodule or not. We need the index or tree we are comparing against to
tell us. Otherwise we have to assume the entry in .gitmodules is stale
or otherwise invalid.
Thus we pass the index of the repository into the workdir iterator, even
if we do not want to compare against it. This follows what git does,
which even for `git diff <tree>`, it will consider staged submodules as
such.
Diffstat (limited to 'src/checkout.h')
-rw-r--r-- | src/checkout.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/checkout.h b/src/checkout.h index f1fe69628..60aa29b26 100644 --- a/src/checkout.h +++ b/src/checkout.h @@ -19,6 +19,7 @@ */ extern int git_checkout_iterator( git_iterator *target, + git_index *index, const git_checkout_options *opts); #endif |