diff options
author | Sascha Cunz <sascha@babbelbox.org> | 2013-11-02 03:43:34 +0000 |
---|---|---|
committer | Sascha Cunz <sascha@babbelbox.org> | 2013-11-02 03:43:34 +0000 |
commit | 352214416c0e5fd85ef02077ddf185103f3a92df (patch) | |
tree | ccb6fd3d761cbdb9d0710bb981f564ee3225fbac /include/git2/checkout.h | |
parent | 10749f6ca25179778cf60e411f7de3de1444271d (diff) | |
download | libgit2-352214416c0e5fd85ef02077ddf185103f3a92df.tar.gz |
Checkout: Don't assert if treeish is NULL
In git_checkout_tree, the first check tests if either repo or treeish is
NULL and says that eithor of them has to have a valid value. But there
is no code to handle the treeish == NULL case.
So, do something meaningful in that case: use HEAD instead.
Diffstat (limited to 'include/git2/checkout.h')
-rw-r--r-- | include/git2/checkout.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h index 4c6a4ebf7..efafdc3e4 100644 --- a/include/git2/checkout.h +++ b/include/git2/checkout.h @@ -280,7 +280,7 @@ GIT_EXTERN(int) git_checkout_index( * * @param repo repository to check out (must be non-bare) * @param treeish a commit, tag or tree which content will be used to update - * the working directory + * the working directory (or NULL to use HEAD) * @param opts specifies checkout options (may be NULL) * @return 0 on success, GIT_ERROR otherwise (use giterr_last for information * about the error) |