summaryrefslogtreecommitdiff
path: root/t/t7102-reset.sh
AgeCommit message (Collapse)Author
2007-11-06builtin-reset: avoid forking "update-index --refresh"Johannes Schindelin
Instead of forking update-index, call refresh_cache() directly. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06builtin-reset: do not call "ls-files --unmerged"Johannes Schindelin
Since reset is a builtin now, it can use the full power of libgit.a and check for unmerged entries itself. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04git-reset: do not be confused if there is nothing to resetJohannes Schindelin
The purpose of the function update_index_from_diff() (which is the callback function we give do_diff_cache()) is to update those index entries which differ from the given commit. Since do_diff_cache() plays games with the in-memory index, this function discarded the cache and reread it. Then, back in the function read_from_tree() we wrote the index. Of course, this broke down when there were no changes and update_index_from_diff() was not called, and therefore the mangled index was not discarded. The solution is to move the index writing into the function update_index_from_diff(). Noticed by Björn Steinbrink. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-14An additional test for "git-reset -- path"Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-12Add tests for documented features of "git reset".Carlos Rica
This adds the new file t/t7102-reset.sh following the text and examples in "Documentation/git-reset.txt" in order to check the behaviour of the upcoming "builtin-reset.c", and be able to compare it with the original "git-reset.sh". Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>