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. 18 Jun, 2018 1 commit
  5. 11 Jun, 2018 1 commit
  6. 10 Jun, 2018 1 commit
  7. 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
  8. 23 Jun, 2015 1 commit
  9. 03 Mar, 2015 2 commits
  10. 18 Feb, 2015 1 commit
  11. 03 Oct, 2014 1 commit
  12. 24 Sep, 2014 1 commit
  13. 18 Aug, 2014 1 commit
  14. 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
  15. 22 Apr, 2014 2 commits
  16. 04 Mar, 2014 1 commit
  17. 05 Feb, 2014 1 commit
  18. 15 Jan, 2014 1 commit
  19. 14 Nov, 2013 1 commit
  20. 28 Sep, 2013 1 commit
  21. 17 Sep, 2013 2 commits
    • Add clar helper to create new commit from index · 155fa234
      There were a lot of places in the test code base that were creating
      a commit from the index on the current branch.  This just adds a
      helper to handle that case pretty easily.  There was only one test
      where this change ended up tweaking the test data, so pretty easy
      and mostly just a cleanup.
      Russell Belfer committed
    • No such thing as an orphan branch · 605da51a
      Unfortunately git-core uses the term "unborn branch" and "orphan
      branch" interchangeably. However, "orphan" is only really there for
      the checkout command, which has the `--orphan` option so it doesn't
      actually create the branch.
      
      Branches never have parents, so the distinction of a branch with no
      parents is odd to begin with. Crucially, the error messages deal with
      unborn branches, so let's use that.
      Carlos Martín Nieto committed
  22. 15 Apr, 2013 1 commit
  23. 09 Apr, 2013 1 commit
  24. 07 Mar, 2013 1 commit
  25. 12 Jan, 2013 1 commit
  26. 03 Jan, 2013 2 commits
  27. 27 Nov, 2012 1 commit
  28. 23 Nov, 2012 1 commit
    • Reset all static variables to NULL in clar's __cleanup · 9094d30b
      Without this change, any failed assertion in the second (or a later) test
      inside a test suite has a chance of double deleting memory, resulting in
      a heap corruption. See #1096 for details.
      
      This leaves alone the test cases where we "just" use cl_git_sandbox_init()
      and cl_git_sandbox_cleanup(). These methods already take good care to not
      double delete a repository.
      
      Fixes #1096
      Sascha Cunz committed
  29. 10 Nov, 2012 1 commit
  30. 09 Nov, 2012 1 commit
  31. 30 Oct, 2012 1 commit
  32. 26 Oct, 2012 1 commit