1. 13 May, 2015 2 commits
    • Fix a few leaks · 3e529e9d
      The interesting one is the notification macro, which was returning
      directly on a soft-abort instead of going through the cleanup.
      Carlos Martín Nieto committed
    • Remove the callbacks struct from the remote · 8f0104ec
      Having the setting be different from calling its actions was not a great
      idea and made for the sake of the wrong convenience.
      
      Instead of that, accept either fetch options, push options or the
      callbacks when dealing with the remote. The fetch options are currently
      only the callbacks, but more options will be moved from setters and
      getters on the remote to the options.
      
      This does mean passing the same struct along the different functions but
      the typical use-case will only call git_remote_fetch() or
      git_remote_push() and so won't notice much difference.
      Carlos Martín Nieto committed
  2. 12 Apr, 2015 1 commit
  3. 12 Mar, 2015 1 commit
  4. 03 Mar, 2015 3 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
    • repository: remove log message override for switching the active branch · 4e498646
      We want to use the "checkout: moving from ..." message in order to let
      git know when a change of branch has happened. Make the convenience
      functions for this goal write this message.
      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
  5. 09 Jan, 2015 1 commit
  6. 08 Jan, 2015 1 commit
  7. 22 Dec, 2014 2 commits
  8. 08 Nov, 2014 1 commit
  9. 07 Nov, 2014 1 commit
    • iterator: submodules are determined by an index or tree · 62a617dc
      We cannot know from looking at .gitmodules whether a directory is a
      submodule or not. We need the index or tree we are comparing against to
      tell us. Otherwise we have to assume the entry in .gitmodules is stale
      or otherwise invalid.
      
      Thus we pass the index of the repository into the workdir iterator, even
      if we do not want to compare against it. This follows what git does,
      which even for `git diff <tree>`, it will consider staged submodules as
      such.
      Carlos Martín Nieto committed
  10. 27 Oct, 2014 1 commit
  11. 24 Oct, 2014 1 commit
    • remote: accept a repo and name for renaming · 46c8f7f8
      Remote objects are not meant to be changed from under the user. We did
      this in rename, but only the name and left the refspecs, such that a
      save would save the wrong refspecs (and a fetch and anything else would
      use the wrong refspecs).
      
      Instead, let's simply take a name and not change any loaded remote from
      under the user.
      Carlos Martín Nieto committed
  12. 03 Sep, 2014 1 commit
  13. 07 Jun, 2014 1 commit
  14. 06 Jun, 2014 1 commit
  15. 03 Apr, 2014 4 commits
  16. 01 Apr, 2014 3 commits
    • More tests and fix submodule index refresh · 8f4e5275
      There was a little bug where the submodule cache thought that the
      index date was out of date even when it wasn't that was resulting
      in some extra scans of index data even when not needed.
      
      Mostly this commit adds a bunch of new tests including adding and
      removing submodules in the index and in the HEAD and seeing if we
      can automatically pick them up when refreshing.
      Russell Belfer committed
    • Remove most submodule reloads from tests · 8061d519
      With the new submodule cache validity checks, we generally don't
      need to call git_submodule_reload_all to have up-to-date submodule
      data.  Some tests are still calling it where I want to actually
      test that it can be called safely and doesn't break anything, but
      mostly it is not needed.
      
      This also expands some of the existing submodule tests to cover
      some variants on the behavior that was already being tested.
      Russell Belfer committed
    • Fix submodule accounting for name and path changes · 4ece3e22
      Wrote tests that try adding, removing, and updating the name of
      submodules which showed a number of problems with how we account
      for changes when incrementally updating the submodule info.  Most
      of these issues didn't exist before because reloading would always
      blow away the old submodule data.
      Russell Belfer committed
  17. 26 Mar, 2014 2 commits
  18. 25 Mar, 2014 2 commits
    • Update behavior for untracked sub-repos · d3bc95fd
      When a directory containing a .git directory (or even just a plain
      gitlink) was found, libgit2 was going out of its way to treat it
      specially.  This seemed like it was necessary because the diff
      code was not originally emulating Git's behavior for untracked
      directories correctly (i.e. scanning for ignored vs untracked items
      inside).  Now that libgit2 diff mimics Git's untracked directory
      behavior, the special handling for contained Git repos is actually
      incorrect and this commit rips it out.
      Russell Belfer committed
    • Make submodules externally refcounted · a15c7802
      `git_submodule` objects were already refcounted internally in case
      the submodule name was different from the path at which it was
      stored.  This makes that refcounting externally used as well, so
      `git_submodule_lookup` and `git_submodule_add_setup` return an
      object that requires a `git_submodule_free` when done.
      Russell Belfer committed
  19. 30 Jan, 2014 1 commit
  20. 15 Jan, 2014 1 commit
  21. 30 Dec, 2013 1 commit
  22. 14 Nov, 2013 1 commit