aboutsummaryrefslogtreecommitdiff
path: root/t/t7501-commit.sh
Commit message (Collapse)AuthorAge
* t7501-commit: Add test for git commit <file> with dirty index.Kristian Høgsberg2007-11-22
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add testcase for amending and fixing author in git commit.Kristian Høgsberg2007-11-22
| | | | | | | We used to clobber author time, but we shouldn't. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2007-11-22
|\ | | | | | | | | | | * maint: Make test scripts executable. bundle create: keep symbolic refs' names instead of resolving them
| * Make test scripts executable.Junio C Hamano2007-11-22
| |
* | Merge branch 'bs/maint-commit-options'Junio C Hamano2007-11-14
|\ \ | | | | | | | | | | | | | | | * bs/maint-commit-options: git-commit: Add tests for invalid usage of -a/--interactive with paths git-commit.sh: Fix usage checks regarding paths given when they do not make sense
| * | git-commit: Add tests for invalid usage of -a/--interactive with pathsBjörn Steinbrink2007-11-12
| |/ | | | | | | | | | | | | | | git-commit was/is broken in that it accepts paths together with -a or --interactive, which it shouldn't. There tests check those usage errors. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-commit: partial commit of paths only removed from the indexJunio C Hamano2007-09-17
| | | | | | | | | | | | | | | | | | | | Because a partial commit is meant to be a way to ignore what are staged in the index, "git rm --cached A && git commit A" should just record what is in A on the filesystem. The previous patch made the command sequence to barf, saying that A has not been added yet. This fixes it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-commit: Allow partial commit of file removal.Junio C Hamano2007-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When making a partial commit, git-commit uses git-ls-files with the --error-unmatch option to expand and sanity check the user supplied path patterns. When any path pattern does not match with the paths known to the index, it errors out, in order to catch a common mistake to say "git commit Makefiel cache.h" and end up with a commit that touches only cache.h (notice the misspelled "Makefile"). This detection however does not work well when the path has already been removed from the index. If you drop a path from the index and try to commit that partially, i.e. $ git rm COPYING $ git commit -m 'Remove COPYING' COPYING the command complains because git does not know anything about COPYING anymore. This introduces a new option --with-tree to git-ls-files and uses it in git-commit when we build a temporary index to write a tree object for the partial commit. When --with-tree=<tree-ish> option is specified, names from the given tree are added to the set of names the index knows about, so we can treat COPYING file in the example as known. Of course, there is no reason to use "git rm" and git-aware people have long time done: $ rm COPYING $ git commit -m 'Remove COPYING' COPYING which works just fine. But this caused a constant confusion. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-commit: a bit more testsJunio C Hamano2007-11-10
| | | | | | | | | | | | Add tests for -s (sign-off) and multiple -m options Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-commit: partial commit of paths only removed from the indexJunio C Hamano2007-09-14
| | | | | | | | | | | | | | | | | | | | Because a partial commit is meant to be a way to ignore what are staged in the index, "git rm --cached A && git commit A" should just record what is in A on the filesystem. The previous patch made the command sequence to barf, saying that A has not been added yet. This fixes it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-commit: Allow partial commit of file removal.Junio C Hamano2007-09-12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When making a partial commit, git-commit uses git-ls-files with the --error-unmatch option to expand and sanity check the user supplied path patterns. When any path pattern does not match with the paths known to the index, it errors out, in order to catch a common mistake to say "git commit Makefiel cache.h" and end up with a commit that touches only cache.h (notice the misspelled "Makefile"). This detection however does not work well when the path has already been removed from the index. If you drop a path from the index and try to commit that partially, i.e. $ git rm COPYING $ git commit -m 'Remove COPYING' COPYING the command complains because git does not know anything about COPYING anymore. This introduces a new option --with-tree to git-ls-files and uses it in git-commit when we build a temporary index to write a tree object for the partial commit. When --with-tree=<tree-ish> option is specified, names from the given tree are added to the set of names the index knows about, so we can treat COPYING file in the example as known. Of course, there is no reason to use "git rm" and git-aware people have long time done: $ rm COPYING $ git commit -m 'Remove COPYING' COPYING which works just fine. But this caused a constant confusion. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-commit.sh: Permit the --amend message to be given with -m/-c/-C/-F.Junio C Hamano2007-08-01
| | | | | | | [jc: adjusted t/t7501 as this makes -F and --amend compatible] Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add test case for basic commit functionality.Kristian Høgsberg2007-07-31
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>