1. 22 May, 2015 1 commit
    • branch: error out if we cannot find the remote · 5014fe95
      When we look for which remote corresponds to a remote-tracking branch,
      we look in the refspecs to see which ones matches. If none do, we should
      abort. We currently ignore the error message from this operation, so
      let's not do that anymore.
      
      As part of the test we're writing, let's test for the expected behaviour
      if we cannot find a refspec which tells us what the remote-tracking
      branch for a remote would look like.
      Carlos Martín Nieto committed
  2. 16 Mar, 2015 1 commit
  3. 04 Mar, 2015 3 commits
  4. 03 Mar, 2015 4 commits
    • config: borrow refcounted references · 9a97f49e
      This changes the get_entry() method to return a refcounted version of
      the config entry, which you have to free when you're done.
      
      This allows us to avoid freeing the memory in which the entry is stored
      on a refresh, which may happen at any time for a live config.
      
      For this reason, get_string() has been forbidden on live configs and a
      new function get_string_buf() has been added, which stores the string in
      a git_buf which the user then owns.
      
      The functions which parse the string value takea advantage of the
      borrowing to parse safely and then release the entry.
      Carlos Martín Nieto committed
    • branch: don't accept a reflog message override · 6bfb990d
      This namespace is about behaving like git's branch command, so let's do
      exactly that instead of taking a reflog message.
      
      This override is still available via the reference namespace.
      Carlos Martín Nieto committed
    • Remove the signature from ref-modifying functions · 659cf202
      The signature for the reflog is not something which changes
      dynamically. Almost all uses will be NULL, since we want for the
      repository's default identity to be used, making it noise.
      
      In order to allow for changing the identity, we instead provide
      git_repository_set_ident() and git_repository_ident() which allow a user
      to override the choice of signature.
      Carlos Martín Nieto committed
    • branch: do capture the error code · 31bc6c04
      We want to ignore GIT_ENOTFOUND, but for that we need to capture the
      error code from the reflog deletion.
      Carlos Martín Nieto committed
  5. 02 Mar, 2015 1 commit
  6. 17 Nov, 2014 1 commit
  7. 08 Nov, 2014 2 commits
  8. 07 May, 2014 1 commit
  9. 18 Apr, 2014 1 commit
  10. 03 Apr, 2014 1 commit
  11. 17 Mar, 2014 1 commit
  12. 07 Mar, 2014 1 commit
  13. 27 Feb, 2014 1 commit
  14. 30 Jan, 2014 6 commits
  15. 27 Jan, 2014 2 commits
  16. 15 Jan, 2014 1 commit
  17. 13 Jan, 2014 1 commit
  18. 11 Dec, 2013 1 commit
    • Improve GIT_EUSER handling · 96869a4e
      This adds giterr_user_cancel to return GIT_EUSER and clear any
      error message that is sitting around.  As a result of using that
      in places, we need to be more thorough with capturing errors that
      happen inside a callback when used internally.  To help with that,
      this also adds giterr_capture and giterr_restore so that when we
      internally use a foreach-type function that clears errors and
      converts them to GIT_EUSER, it is easier to restore not just the
      return value, but the actual error message text.
      Russell Belfer committed
  19. 05 Nov, 2013 2 commits
  20. 17 Sep, 2013 1 commit
    • No such thing as an orphan branch · 605da51a
      Unfortunately git-core uses the term "unborn branch" and "orphan
      branch" interchangeably. However, "orphan" is only really there for
      the checkout command, which has the `--orphan` option so it doesn't
      actually create the branch.
      
      Branches never have parents, so the distinction of a branch with no
      parents is odd to begin with. Crucially, the error messages deal with
      unborn branches, so let's use that.
      Carlos Martín Nieto committed
  21. 17 Jun, 2013 2 commits
  22. 30 May, 2013 1 commit
  23. 28 May, 2013 1 commit
  24. 11 May, 2013 2 commits
  25. 06 May, 2013 1 commit
    • git_branch_set_upstream with local branches · 3d42e9a3
      Currently git_branch_set_upstream when passed a local branch
      creates invalid configuration, for ex. if we setup branch
      'tracking_master' to track local 'master' libgit2 generates
      the following config
      
      ```
      [branch "track_master"]
        remote = .
        merge = .refs/heads/track_master
      ```
      
      The merge value is invalid and calling git_branch_upstream on
      'tracking_master' results in invalid reference error.
      
      It should do:
      
      ```
      [branch "track_master"]
        remote = .
        merge = refs/heads/master
      ```
      Nikolai Vladimirov committed