summaryrefslogtreecommitdiff
path: root/oidset.h
diff options
context:
space:
mode:
authorLibravatar Jiang Xin <worldhello.net@gmail.com>2021-10-30 09:34:30 +0800
committerLibravatar Jiang Xin <worldhello.net@gmail.com>2021-10-30 09:34:30 +0800
commitcd9ef9ce67bf2934845a6a76a1ecdbc9a5f7a6e0 (patch)
treeba34cf45622ddcd8e9d250a048661a7e6a8a35ee /oidset.h
parentMerge branch 'master' of github.com:nafmo/git-l10n-sv (diff)
parentGit 2.34-rc0 (diff)
downloadtgif-cd9ef9ce67bf2934845a6a76a1ecdbc9a5f7a6e0.tar.xz
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (762 commits) Git 2.34-rc0 wrapper: remove xunsetenv() log: document --encoding behavior on iconv() failure Revert "logmsg_reencode(): warn when iconv() fails" completion: fix incorrect bash/zsh string equality check add, rm, mv: fix bug that prevents the update of non-sparse dirs git-bundle.txt: add missing words and punctuation Documentation/Makefile: fix lint-docs mkdir dependency submodule: drop unused sm_name parameter from append_fetch_remotes() The fifteenth batch gitweb.txt: change "folder" to "directory" gitignore.txt: change "folder" to "directory" git-multi-pack-index.txt: change "folder" to "directory" git.txt: fix typo archive: describe compression level option config.txt: fix typo command-list.txt: remove 'sparse-index' from main help userdiff-cpp: back out the digit-separators in numbers submodule--helper: fix incorrect newlines in an error message branch (doc): -m/-c copies config and reflog ...
Diffstat (limited to 'oidset.h')
-rw-r--r--oidset.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/oidset.h b/oidset.h
index 01f6560283..ba4a5a2cd3 100644
--- a/oidset.h
+++ b/oidset.h
@@ -57,7 +57,10 @@ int oidset_remove(struct oidset *set, const struct object_id *oid);
/**
* Returns the number of oids in the set.
*/
-int oidset_size(struct oidset *set);
+static inline int oidset_size(const struct oidset *set)
+{
+ return kh_size(&set->set);
+}
/**
* Remove all entries from the oidset, freeing any resources associated with