1. 10 Apr, 2023 1 commit
  2. 05 Sep, 2022 1 commit
  3. 31 Aug, 2022 1 commit
  4. 23 Feb, 2022 1 commit
  5. 11 Nov, 2021 1 commit
  6. 09 Nov, 2021 1 commit
  7. 17 Oct, 2021 1 commit
    • str: introduce `git_str` for internal, `git_buf` is external · f0e693b1
      libgit2 has two distinct requirements that were previously solved by
      `git_buf`.  We require:
      
      1. A general purpose string class that provides a number of utility APIs
         for manipulating data (eg, concatenating, truncating, etc).
      2. A structure that we can use to return strings to callers that they
         can take ownership of.
      
      By using a single class (`git_buf`) for both of these purposes, we have
      confused the API to the point that refactorings are difficult and
      reasoning about correctness is also difficult.
      
      Move the utility class `git_buf` to be called `git_str`: this represents
      its general purpose, as an internal string buffer class.  The name also
      is an homage to Junio Hamano ("gitstr").
      
      The public API remains `git_buf`, and has a much smaller footprint.  It
      is generally only used as an "out" param with strict requirements that
      follow the documentation.  (Exceptions exist for some legacy APIs to
      avoid breaking callers unnecessarily.)
      
      Utility functions exist to convert a user-specified `git_buf` to a
      `git_str` so that we can call internal functions, then converting it
      back again.
      Edward Thomson committed
  8. 26 Aug, 2021 2 commits
  9. 07 Jan, 2021 1 commit
  10. 17 Oct, 2019 1 commit
  11. 20 Jul, 2019 1 commit
  12. 22 Feb, 2019 1 commit
  13. 01 Dec, 2018 1 commit
  14. 10 Jun, 2018 1 commit
  15. 14 Sep, 2015 1 commit
  16. 13 May, 2015 1 commit
    • 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
  17. 12 May, 2015 1 commit
  18. 17 Mar, 2015 1 commit
  19. 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
  20. 27 Feb, 2015 1 commit
  21. 08 Nov, 2014 1 commit
  22. 02 Jul, 2014 1 commit
  23. 01 Jul, 2014 1 commit
  24. 27 Jun, 2014 1 commit
  25. 02 Apr, 2014 1 commit
  26. 06 Mar, 2014 1 commit
  27. 30 Jan, 2014 3 commits
  28. 11 Dec, 2013 1 commit
  29. 14 Nov, 2013 1 commit
  30. 31 Oct, 2013 3 commits
  31. 03 Oct, 2013 2 commits
    • Simplify git_path_is_empty_dir implementation · d0849f83
      This simplifies git_path_is_empty_dir on both Windows (getting rid
      of git_buf allocation inside the function) and other platforms (by
      just using git_path_direach), and adds tests for the function, and
      uses the function to simplify some existing tests.
      Russell Belfer committed
    • Initial iconv hookup for precomposed unicode · 219d3457
      This hooks up git_path_direach and git_path_dirload so that they
      will take a flag indicating if directory entry names should be
      tested and converted from decomposed unicode to precomposed form.
      This code will only come into play on the Apple platform and even
      then, only when certain types of filesystems are used.
      
      This involved adding a flag to these functions which involved
      changing a lot of places in the code.
      
      This was an opportunity to do a bit of code cleanup here and there,
      for example, getting rid of the git_futils_cleanupdir_r function in
      favor of a simple flag to git_futils_rmdir_r to not remove the top
      level entry.  That ended up adding depth tracking during rmdir_r
      which led to a safety check for infinite directory recursion.  Yay.
      
      This hasn't actually been tested on the Mac filesystems where the
      issue occurs.  I still need to get test environment for that.
      Russell Belfer committed
  32. 02 Oct, 2013 1 commit