1. 29 Jun, 2018 5 commits
    • index: commit the changes to the index properly · b242cdbf
      Now that the index has a "dirty" state, where it has changes that have
      not yet been committed or rolled back, our tests need to be adapted to
      actually commit or rollback the changes instead of assuming that the
      index can be operated on in its indeterminate state.
      Edward Thomson committed
    • index: test dirty index bit · dc4a18c7
      Test that any changes to the index will mark the index as dirty.  Also
      ensure that when we initialize a new index, read the index contents
      from disk, or write the index contents to disk that we reset the dirty
      flag to zero.  Further ensure that an unforced read with dirty contents
      (when the on-disk index has not changed) does _not_ reset the dirty
      flag as we have not updated the contents of our index and our unsaved
      contents remain intact.
      Edward Thomson committed
    • index: add a dirty bit reflecting unsaved changes · 7c56c49b
      Teach the index when it is "dirty", and has unsaved changes.  Consider
      the index dirty whenever a caller has added or removed an entry from the
      main index, REUC or NAME section, including when the index is completely
      cleared.  Similarly, consider the index _not_ dirty immediately after it
      is written, or when it is read from the on-disk index.
      
      This allows us to ensure that unsaved changes are not lost when we
      automatically refresh the index.
      Edward Thomson committed
    • stash: use _an_ index not _the_ index · 4919e495
      Don't manipulate the repository's index during stash; instead,
      manipulate a temporary index and check it out.
      
      This allows us to use the checkout mechanism to update the workdir and
      the repository's index, and allows checkout to use its common mechanisms
      to write data and handle errors.
      Edward Thomson committed
    • checkout tests: validate GIT_CHECKOUT_NO_REFRESH · 55a96606
      Add tests that ensure that we re-read the on-disk image by default
      during checkout, but when the `GIT_CHECKOUT_NO_REFRESH` option is
      specified, we do _not_ re-read the index.
      Edward Thomson committed
  2. 26 Jun, 2018 4 commits
    • checkout: always set the index in checkout data · 88b30f51
      Always set the `index` in the `checkout_data`, even in the case that we
      are not reloading the index.  Other functionality in checkout examines
      the index (for example: determining whether the workdir is modified) and
      we need it even in the (uncommon) case that we are not reloading.
      Edward Thomson committed
    • index::addall tests: write the index · 7330ae67
      When running `git_index_add_all`, we should write the index to disk so
      that we can re-read it safely during status.
      Edward Thomson committed
    • index::reuc tests: test that checkout succeeds · 08ea0d7d
      The index::reuc tests must test that the checkout itself succeeds,
      otherwise subsequent tests are not valid.
      
      In fact, the checkouts were failing because when checking out `SAFE`,
      they cannot update the files that are in conflict.  Change the checkout
      level to `FORCE` to ensure that they get updated correctly.
      Edward Thomson committed
    • index::names tests: add conflicts with high stages · c4ce017f
      We add entries into the main index to correspond with the NAME entries
      that we're going to test.  NAME entries store the results of conflicts
      occuring with rename detection during merge, and they must correspond to
      conflicts in the index.
      
      This test was mistakenly adding regular entries.  The checkout
      validation failed, since it requires NAME entries to correspond to
      high-stage (conflict) entries.  Correct the test to actually create
      conflicts.
      Edward Thomson committed
  3. 25 Jun, 2018 2 commits
  4. 24 Jun, 2018 2 commits
  5. 22 Jun, 2018 4 commits
  6. 18 Jun, 2018 5 commits
  7. 17 Jun, 2018 1 commit
  8. 16 Jun, 2018 1 commit
  9. 15 Jun, 2018 16 commits