1. 13 Jul, 2018 1 commit
    • treewide: remove use of C++ style comments · 9994cd3f
      C++ style comment ("//") are not specified by the ISO C90 standard and
      thus do not conform to it. While libgit2 aims to conform to C90, we did
      not enforce it until now, which is why quite a lot of these
      non-conforming comments have snuck into our codebase. Do a tree-wide
      conversion of all C++ style comments to the supported C style comments
      to allow us enforcing strict C90 compliance in a later commit.
      Patrick Steinhardt committed
  2. 29 Jun, 2018 1 commit
  3. 25 Jun, 2018 1 commit
  4. 22 Jun, 2018 1 commit
  5. 10 Jun, 2018 1 commit
  6. 20 Apr, 2018 1 commit
  7. 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
  8. 04 Aug, 2016 1 commit
    • refspec: do not set empty rhs for fetch refspecs · 1eee631d
      According to git-fetch(1), "[t]he colon can be omitted when <dst>
      is empty." So according to git, the refspec "refs/heads/master"
      is the same as the refspec "refs/heads/master:" when fetching
      changes. When trying to fetch from a remote with a trailing
      colon with libgit2, though, the fetch actually fails while it
      works when the trailing colon is left out. So obviously, libgit2
      does _not_ treat these two refspec formats the same for fetches.
      
      The problem results from parsing refspecs, where the resulting
      refspec has its destination set to an empty string in the case of
      a trailing colon and to a `NULL` pointer in the case of no
      trailing colon. When passing this to our DWIM machinery, the
      empty string gets translated to "refs/heads/", which is simply
      wrong.
      
      Fix the problem by having the parsing machinery treat both cases
      the same for fetch refspecs.
      Patrick Steinhardt committed
  9. 23 Feb, 2016 1 commit
  10. 30 Jun, 2015 1 commit
  11. 22 May, 2015 1 commit
  12. 10 Mar, 2015 1 commit
  13. 09 Nov, 2014 1 commit
    • push: use the common refspec parser · aad638f3
      There is one well-known and well-tested parser which we should use,
      instead of implementing parsing a second time.
      
      The common parser is also augmented to copy the LHS into the RHS if the
      latter is empty.
      
      The expressions test had to change a bit, as we now catch a bad RHS of a
      refspec locally.
      Carlos Martín Nieto committed
  14. 21 Aug, 2014 1 commit
  15. 17 Aug, 2014 1 commit
  16. 04 Jul, 2014 2 commits
  17. 27 Jan, 2014 1 commit
  18. 01 Nov, 2013 1 commit
  19. 01 Jul, 2013 1 commit
  20. 30 Apr, 2013 1 commit
  21. 28 Apr, 2013 1 commit
  22. 20 Apr, 2013 2 commits
    • refspec: unify the string and parsed data · 1be680c4
      It used to be separate as an attempt to make the querying easier, but
      it didn't work out that way, so put all the data together.
      
      Add git_refspec_string() as well to get the original string, which is
      now stored alongside the independent parts.
      Carlos Martín Nieto committed
    • remote: handle multiple refspecs · 4330ab26
      A remote can have a multitude of refspecs. Up to now our git_remote's
      have supported a single one for each fetch and push out of simplicity
      to get something working.
      
      Let the remotes and internal code know about multiple remotes and get
      the tests passing with them.
      
      Instead of setting a refspec, the external users can clear all and add
      refspecs. This should be enough for most uses, though we're still
      missing a querying function.
      Carlos Martín Nieto committed
  23. 11 Feb, 2013 2 commits
  24. 11 Jan, 2013 1 commit
  25. 08 Jan, 2013 1 commit
  26. 11 Nov, 2012 1 commit
  27. 25 Oct, 2012 1 commit
  28. 07 Oct, 2012 1 commit
  29. 30 Sep, 2012 1 commit
  30. 25 Sep, 2012 1 commit
  31. 29 May, 2012 1 commit
  32. 17 May, 2012 2 commits
  33. 03 May, 2012 1 commit
  34. 30 Apr, 2012 1 commit
  35. 26 Apr, 2012 1 commit
  36. 06 Mar, 2012 1 commit
    • error-handling: Repository · cb8a7961
      This also includes droping `git_buf_lasterror` because it makes no sense
      in the new system. Note that in most of the places were it has been
      dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so
      instead it should return a generic `-1` and obviously not throw
      anything.
      Vicent Martí committed