1. 01 May, 2017 1 commit
  2. 05 Apr, 2017 1 commit
  3. 13 Feb, 2017 2 commits
  4. 29 Dec, 2016 1 commit
  5. 04 Nov, 2016 1 commit
    • branch: fix forced branch creation on HEAD of a bare repo · f9793884
      The code correctly detects that forced creation of a branch on a
      nonbare repo should not be able to overwrite a branch which is
      the HEAD reference.  But there's no reason to prevent this on
      a bare repo, and in fact, git allows this.  I.e.,
      
         git branch -f master new_sha
      
      works on a bare repo with HEAD set to master.  This change fixes
      that problem, and updates tests so that, for this case, both the
      bare and nonbare cases are checked for correct behavior.
      John Fultz committed
  6. 26 Apr, 2016 1 commit
    • annotated_commit: provide refs and description · d5592378
      Differentiate between the ref_name used to create an annotated_commit
      (that can subsequently be used to look up the reference) and the
      description that we resolved this with (which _cannot_ be looked up).
      
      The description is used for things like reflogs (and may be a ref name,
      and ID something that we revparsed to get here), while the ref name must
      actually be a reference name, and is used for things like rebase to
      return to the initial branch.
      Edward Thomson committed
  7. 12 Jul, 2015 1 commit
  8. 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
  9. 16 Mar, 2015 1 commit
  10. 04 Mar, 2015 3 commits
  11. 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
  12. 02 Mar, 2015 1 commit
  13. 17 Nov, 2014 1 commit
  14. 08 Nov, 2014 2 commits
  15. 07 May, 2014 1 commit
  16. 18 Apr, 2014 1 commit
  17. 03 Apr, 2014 1 commit
  18. 17 Mar, 2014 1 commit
  19. 07 Mar, 2014 1 commit
  20. 27 Feb, 2014 1 commit
  21. 30 Jan, 2014 6 commits
  22. 27 Jan, 2014 2 commits
  23. 15 Jan, 2014 1 commit
  24. 13 Jan, 2014 1 commit
  25. 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
  26. 05 Nov, 2013 2 commits