- 29 Jun, 2018 5 commits
-
-
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 -
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 -
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 -
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 -
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
-
- 26 Jun, 2018 4 commits
-
-
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 -
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 -
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 -
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
-
- 25 Jun, 2018 2 commits
-
-
Fix type confusion in git_smart__connect
Patrick Steinhardt committed -
Verify ref_pkt's are long enough
Patrick Steinhardt committed
-
- 24 Jun, 2018 2 commits
-
-
If the remote sends a too-short packet, we'll allow `len` to go negative and eventually issue a malloc for <= 0 bytes on ``` pkt->head.name = git__malloc(alloclen); ```
Nelson Elhage committed -
Nothing verifies that t->refs[0] is a GIT_PKT_REF. A remote can send another packet type, ultimately resulting in a type confusion in `git_smart__detect_caps`
Nelson Elhage committed
-
- 22 Jun, 2018 4 commits
-
-
Config parser cleanups
Edward Thomson committed -
Buffers which ran out of memory will never have any memory attached to them. As such, it is not necessary to call `git_buf_free` if the buffer is out of memory.
Patrick Steinhardt committed -
The `parse_variable` function has two out parameters `var_name` and `var_value`. Currently, those are not being sanitized to `NULL`. when. any error happens inside of the `parse_variable` function. Fix that. While at it, the coding style is improved to match our usual coding practices more closely.
Patrick Steinhardt committed -
The function `git_config_parse` uses several callbacks to pass data along to the caller as it parses the file. One design shortcoming here is that strings passed to those callbacks are expected to be freed by them, which is really confusing. Fix the issue by changing memory ownership here. Instead of expecting the `on_variable` callbacks to free memory for `git_config_parse`, just do it inside of `git_config_parse`. While this obviously requires a bit more memory allocation churn due to having to copy both name and value at some places, this shouldn't be too much of a burden.
Patrick Steinhardt committed
-
- 18 Jun, 2018 5 commits
-
-
Fix last references to deprecated git_buf_free
Edward Thomson committed -
revwalk: avoid walking the entire history when output is unsorted
Edward Thomson committed -
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
Edward Thomson committed
-
Add mailmap support.
Edward Thomson committed
-
- 17 Jun, 2018 1 commit
-
-
Nika Layzell committed
-
- 16 Jun, 2018 1 commit
-
-
tree: remove unused functions
Edward Thomson committed
-
- 15 Jun, 2018 16 commits
-
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Link `mbedTLS` libraries in when `SHA1_BACKEND` == "mbedTLS"
Patrick Steinhardt committed -
editorconfig: allow trailing whitespace in markdown
Patrick Steinhardt committed -
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Emilio Cobos Álvarez committed
-
Nika Layzell committed
-
Nika Layzell committed
-