1. 18 Oct, 2019 1 commit
    • 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
  2. 20 Jul, 2019 1 commit
  3. 01 Dec, 2018 1 commit
  4. 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
  5. 06 Jul, 2018 1 commit
  6. 18 Jun, 2018 1 commit
  7. 11 Jun, 2018 1 commit
  8. 10 Jun, 2018 2 commits
  9. 06 Jun, 2018 1 commit
    • Fix stash save bug with fast path index check · 5a7d454b
      If the index contains stat data for a modified file, and the file is
      not racily dirty, and there exists an untracked working tree directory
      alphabetically after that file, and there are no other changes to the
      repo, then git_stash_save would fail. It would confuse the untracked
      working tree directory for the modified file, because they have the
      same sha: zero.  The wt directory has a sha of zero because it's a
      directory, and the file would have a zero sha because we wouldn't read
      the file -- we would just know that it doesn't match the index.  To
      fix this confusion, we simply check mode as well as SHA.
      David Turner committed
  10. 29 Jun, 2015 1 commit
  11. 26 Jun, 2015 1 commit
  12. 25 Jun, 2015 3 commits
  13. 23 Jun, 2015 1 commit
  14. 20 Jun, 2015 1 commit
  15. 02 Jun, 2015 1 commit
  16. 29 May, 2015 1 commit
    • Rename GIT_EMERGECONFLICT to GIT_ECONFLICT · 885b94aa
      We do not error on "merge conflicts"; on the contrary, merge conflicts
      are a normal part of merging.  We only error on "checkout conflicts",
      where a change exists in the index or the working directory that would
      otherwise be overwritten by performing the checkout.
      
      This *may* happen during merge (after the production of the new index
      that we're going to checkout) but it could happen during any checkout.
      Edward Thomson committed
  17. 13 May, 2015 1 commit
  18. 11 May, 2015 7 commits
  19. 03 Mar, 2015 2 commits
  20. 18 Feb, 2015 1 commit
  21. 03 Oct, 2014 1 commit
  22. 24 Sep, 2014 1 commit
  23. 18 Aug, 2014 1 commit
  24. 01 Jul, 2014 1 commit
  25. 23 Apr, 2014 1 commit
    • Make checkout match diff for untracked/ignored dir · 37da3685
      When diff finds an untracked directory, it emulates Git behavior
      by looking inside the directory to see if there are any untracked
      items inside it. If there are only ignored items inside the dir,
      then diff considers it ignored, even if there is no direct ignore
      rule for it.
      
      Checkout was not copying this behavior - when it found an untracked
      directory, it just treated it as untracked.  Unfortunately, when
      combined with GIT_CHECKOUT_REMOVE_UNTRACKED, this made is seem that
      checkout (and stash, which uses checkout) was removing ignored
      items when you had only asked it to remove untracked ones.
      
      This commit moves the logic for advancing past an untracked dir
      while scanning for non-ignored items into an iterator helper fn,
      and uses that for both diff and checkout.
      Russell Belfer committed
  26. 22 Apr, 2014 2 commits
  27. 25 Mar, 2014 1 commit
    • 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
  28. 04 Mar, 2014 1 commit
  29. 05 Feb, 2014 1 commit