git2go: could not determine kind of name for C.GIT_CHECKOUT_SAFE_CREATE

commit 98793509039cc80b774c527d9e5a7b5d70e3b6c4
Author: Shawn Landden <shawn@churchofgit.com>
Date:   Sat Mar 14 15:42:25 2015 -0700

    GIT_CHECKOUT_SAFE_CREATE has been removed in libgit2

    Signed-off-by: Shawn Landden <shawn@churchofgit.com>

diff --git a/checkout.go b/checkout.go
index 6eb6098..9456168 100644
--- a/checkout.go
+++ b/checkout.go
@@ -15,7 +15,6 @@ type CheckoutStrategy uint
 const (
        CheckoutNone                      CheckoutStrategy = C.GIT_CHECKOUT_NONE                         // Dry run, no actual updates
        CheckoutSafe                      CheckoutStrategy = C.GIT_CHECKOUT_SAFE                         // Allow safe updates that cannot overwrite uncommitted data
-       CheckoutSafeCreate                CheckoutStrategy = C.GIT_CHECKOUT_SAFE_CREATE                  // Allow safe updates plus creation of missing files
        CheckoutForce                     CheckoutStrategy = C.GIT_CHECKOUT_FORCE                        // Allow all updates to force working directory to look like index
        CheckoutAllowConflicts            CheckoutStrategy = C.GIT_CHECKOUT_ALLOW_CONFLICTS              // Allow checkout to make safe updates even if conflicts are found
        CheckoutRemoveUntracked           CheckoutStrategy = C.GIT_CHECKOUT_REMOVE_UNTRACKED             // Remove untracked files not in index (that are not ignored)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 20 (5 by maintainers)

Most upvoted comments

So I found out that homebrew provides version 0.23.0, so I installed 0.22.3 manually and pinned it for now.

Edit: I will put that here for any developers on OS X who run into the same problem and don’t know what to do:

brew unlink libgit2
brew install https://raw.githubusercontent.com/Homebrew/homebrew/d6a9bb6adeb2043c5c5e9ba3a878decdefc1d240/Library/Formula/libgit2.rb
brew switch libgit2 0.22.3
brew pin libgit2

The last line pins libgit2 to 0.22.3, so if you want to use 0.23.0 or later you have to brew unpin libgit2 first!