1. 12 Jul, 2020 1 commit
  2. 05 Jun, 2020 1 commit
  3. 18 Oct, 2019 2 commits
    • refdb_fs: properly parse corrupted reflogs · 7968e90f
      In previous versions, libgit2 could be coerced into writing reflog
      messages with embedded newlines into the reflog by using
      `git_stash_save` with a message containing newlines. While the root
      cause is fixed now, it was noticed that upstream git is in fact able to
      read such corrupted reflog messages just fine.
      
      Make the reflog parser more lenient in order to just skip over
      malformatted reflog lines to bring us in line with git. This requires us
      to change an existing test that verified that we do indeed _fail_ to
      parse such logs.
      Patrick Steinhardt committed
    • reflog: allow adding entries with newlines in their message · d8233feb
      Currently, the reflog disallows any entries that have a message with
      newlines, as that would effectively break the reflog format, which may
      contain a single line per entry, only. Upstream git behaves a bit
      differently, though, especially when considering stashes: instead of
      rejecting any reflog entry with newlines, git will simply replace
      newlines with spaces. E.g. executing 'git stash push -m "foo\nbar"' will
      create a reflog entry with "foo bar" as entry message.
      
      This commit adjusts our own logic to stop rejecting commit messages with
      newlines. Previously, this logic was part of `git_reflog_append`, only.
      There is a second place though where we add reflog entries, which is the
      serialization code in the filesystem refdb. As it didn't contain any
      sanity checks whatsoever, the refdb would have been perfectly happy to
      write malformatted reflog entries to the disk. This is being fixed with
      the same logic as for the reflog itself.
      Patrick Steinhardt committed
  4. 20 Jul, 2019 1 commit
  5. 22 Jan, 2019 1 commit
  6. 01 Dec, 2018 1 commit
  7. 18 Nov, 2018 1 commit
  8. 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
  9. 10 Jun, 2018 1 commit
  10. 22 Nov, 2017 1 commit
  11. 14 Nov, 2017 4 commits
  12. 28 Feb, 2017 1 commit
  13. 29 Dec, 2016 1 commit
  14. 12 Nov, 2015 1 commit
  15. 03 Nov, 2015 1 commit
  16. 29 Oct, 2015 1 commit
  17. 03 Mar, 2015 1 commit
    • 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
  18. 20 Mar, 2014 1 commit
  19. 19 Mar, 2014 1 commit
  20. 17 Mar, 2014 1 commit
  21. 30 Jan, 2014 1 commit
  22. 15 Jan, 2014 1 commit
  23. 09 Dec, 2013 3 commits
  24. 23 Nov, 2013 2 commits
    • reflog: remove git_reflog_append_to() · 13c9e44a
      This was a convenience method for the refs front-end to do the reflog
      writing. This is now done in the backend and it has no more reason for
      being.
      Carlos Martín Nieto committed
    • reflog: integrate into the ref writing · a57dd3b7
      Whenever a reference is created or updated, we need to write to the
      reflog regardless of whether the user gave us a message, so we shouldn't
      leave that to the ref frontend, but integrate it into the backend.
      
      This also eliminates the race between ref update and writing to the
      reflog, as we protect the reflog with the ref lock.
      
      As an additional benefit, this reflog append on the backend happens by
      appending to the file instead of parsing and rewriting it.
      Carlos Martín Nieto committed
  25. 14 Nov, 2013 1 commit