In attempt to provide adequate Git command analogy in regards to ignored files handling, `git_ignore_path_is_ignored` description mentions doing `git add .` on directory containing the file, and whether the file in question would be added or not - but behavior of the two matches for untracked files only, making the comparison misleading in general sense. For tracked files, Git doesn't subject them to ignore rules, so even if a rule applies, `git add .` would actually add the tracked file changes to index, while `git_ignore_path_is_ignored` would still consider the file being ignored (as it doesn't check the index, as documented). Let's provide `git check-ignore --no-index` as analogous Git command example instead, being more aligned with what `git_ignore_path_is_ignored` is about, no matter if the file in question is already tracked or not. See issue #4720 (git_ignore_path_is_ignored documentation misleading?, 2018-07-10)[1] for additional information. [1] https://github.com/libgit2/libgit2/issues/4720
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
sys | Loading commit data... | |
annotated_commit.h | Loading commit data... | |
attr.h | Loading commit data... | |
blame.h | Loading commit data... | |
blob.h | Loading commit data... | |
branch.h | Loading commit data... | |
buffer.h | Loading commit data... | |
checkout.h | Loading commit data... | |
cherrypick.h | Loading commit data... | |
clone.h | Loading commit data... | |
commit.h | Loading commit data... | |
common.h | Loading commit data... | |
config.h | Loading commit data... | |
cred_helpers.h | Loading commit data... | |
describe.h | Loading commit data... | |
diff.h | Loading commit data... | |
errors.h | Loading commit data... | |
filter.h | Loading commit data... | |
global.h | Loading commit data... | |
graph.h | Loading commit data... | |
ignore.h | Loading commit data... | |
index.h | Loading commit data... | |
indexer.h | Loading commit data... | |
inttypes.h | Loading commit data... | |
mailmap.h | Loading commit data... | |
merge.h | Loading commit data... | |
message.h | Loading commit data... | |
net.h | Loading commit data... | |
notes.h | Loading commit data... | |
object.h | Loading commit data... | |
odb.h | Loading commit data... | |
odb_backend.h | Loading commit data... | |
oid.h | Loading commit data... | |
oidarray.h | Loading commit data... | |
pack.h | Loading commit data... | |
patch.h | Loading commit data... | |
pathspec.h | Loading commit data... | |
proxy.h | Loading commit data... | |
rebase.h | Loading commit data... | |
refdb.h | Loading commit data... | |
reflog.h | Loading commit data... | |
refs.h | Loading commit data... | |
refspec.h | Loading commit data... | |
remote.h | Loading commit data... | |
repository.h | Loading commit data... | |
reset.h | Loading commit data... | |
revert.h | Loading commit data... | |
revparse.h | Loading commit data... | |
revwalk.h | Loading commit data... | |
signature.h | Loading commit data... | |
stash.h | Loading commit data... | |
status.h | Loading commit data... | |
stdint.h | Loading commit data... | |
strarray.h | Loading commit data... | |
submodule.h | Loading commit data... | |
tag.h | Loading commit data... | |
trace.h | Loading commit data... | |
transaction.h | Loading commit data... | |
transport.h | Loading commit data... | |
tree.h | Loading commit data... | |
types.h | Loading commit data... | |
version.h | Loading commit data... | |
worktree.h | Loading commit data... |