1. 23 Feb, 2022 1 commit
  2. 12 Feb, 2022 1 commit
    • merge: make the internal flags public · 0fbf62cd
      We made the flags that enable recursive merge internal, on the
      assumption that nobody would want them and they're hard to reason about.
      (Giving people an option that nobody wants is just extra noise.)
      
      However, it made it hard for _us_ to reason about.  There's no good
      reason to keep it private, let's just make it public and push that
      cognitive load onto our poor users.  But they should expect it, they're
      dealing with git, after all.
      Edward Thomson committed
  3. 07 Feb, 2022 1 commit
  4. 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
  5. 27 Nov, 2020 1 commit
  6. 11 Oct, 2020 1 commit
  7. 15 Jan, 2020 1 commit
  8. 16 Jun, 2019 1 commit
  9. 22 Jan, 2019 1 commit
  10. 03 Jul, 2017 1 commit
    • Make sure to always include "common.h" first · 0c7f49dd
      Next to including several files, our "common.h" header also declares
      various macros which are then used throughout the project. As such, we
      have to make sure to always include this file first in all
      implementation files. Otherwise, we might encounter problems or even
      silent behavioural differences due to macros or defines not being
      defined as they should be. So in fact, our header and implementation
      files should make sure to always include "common.h" first.
      
      This commit does so by establishing a common include pattern. Header
      files inside of "src" will now always include "common.h" as its first
      other file, separated by a newline from all the other includes to make
      it stand out as special. There are two cases for the implementation
      files. If they do have a matching header file, they will always include
      this one first, leading to "common.h" being transitively included as
      first file. If they do not have a matching header file, they instead
      include "common.h" as first file themselves.
      
      This fixes the outlined problems and will become our standard practice
      for header and source files inside of the "src/" from now on.
      Patrick Steinhardt committed
  11. 15 Mar, 2017 2 commits
  12. 01 Apr, 2016 1 commit
    • merge_driver: fix missing `goto done;` · 83c93a7c
      The code initializing the merge driver registry accidentally
      forgot a `goto done` in case of an error. Because of this the
      next line, which registers the global shutdown callback for the
      merge drivers, is only called when an error occured.
      
      Fix this by adding the missing `goto done`. This fixes some
      memory leaks when the global state is shut down.
      Patrick Steinhardt committed
  13. 17 Mar, 2016 6 commits