aboutsummaryrefslogtreecommitdiffstats
path: root/commit.h
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2014-04-05 18:59:36 +0200
committerJunio C Hamano <gitster@pobox.com>2014-04-07 10:42:35 -0700
commitc215d3d2826c882feb819e5743287ec74d9ff693 (patch)
tree982b8ca3923d2b85feea648f7107114e44188bd8 /commit.h
parentstatus/commit: show staged submodules regardless of ignore config (diff)
downloadgit-c215d3d2826c882feb819e5743287ec74d9ff693.tar.gz
git-c215d3d2826c882feb819e5743287ec74d9ff693.zip
commit -m: commit staged submodules regardless of ignore config
The previous commit fixed the problem that the staged but that ignored submodules did not show up in the status output of the commit command and weren't committed afterwards either. But when commit doesn't generate the status output (e.g. when used in a script with '-m') the ignored submodule will still not be committed. This is because in that case a different code path is taken which calls index_differs_from() instead of calling the wt_status functions. Fix that by calling index_differs_from() from builtin/commit.c with a diff_options argument value that tells it not ignore any submodule changes unless the '--ignore-submodules' option is used. Even though this option isn't yet implemented for cmd_commit() but only for cmd_status() this prepares cmd_commit() to correctly handle the '--ignore-submodules' option later. As status and commit share the same ignore_submodule_arg variable this makes the code more robust against accidental breakage and documents how to correctly call index_differs_from(). Change the expected result of the test documenting this problem from failure to success. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions
ertions'>+1 2005-06-25First cut at git-unpack-objectsLinus Torvalds2-1/+107 2005-06-25git-pack-objects: fix typoLinus Torvalds1-1/+1 2005-06-25git-pack-objects: create a packed object representation.Linus Torvalds2-1/+406 2005-06-25[PATCH] git-write-tree doesn't check alternate directoriesJan Harkes1-5/+4 2005-06-24git-rev-list: add option to list all objects (not just commits)Linus Torvalds1-0/+91 2005-06-24git-rev-parse: re-organize and be more carefulLinus Torvalds1-26/+81 2005-06-23Add "git-patch-id" program to generate patch ID's.Linus Torvalds2-1/+81 2005-06-23Clean up git-diff-tree 'header' generationLinus Torvalds1-12/+6 2005-06-23git-apply: take "--apply" flag to force an apply even if we also ask for a di...Linus Torvalds1-1/+4 2005-06-23Make "git fetch" able to fetch a named tagLinus Torvalds1-2/+8 2005-06-22[PATCH] Fix to how --merge-order handles multiple rootsJon Seymour1-4/+7 2005-06-22[PATCH] A test case that demonstrates a problem with merges with two roots.Jon Seymour1-0/+61 2005-06-22Don't ignore reachability of tag objects in fsckLinus Torvalds1-4/+0 2005-06-22Add "git-clone-script" thingyLinus Torvalds2-1/+9 2005-06-22[PATCH] Fix --merge-order unit test breaks introduced by 6c88be169881c9223532...Jon Seymour1-12/+3 2005-06-22Add "gitk" to the list of scripts to be installed automatically.Linus Torvalds1-1/+1 2005-06-22[PATCH] git-apply: tests for --stat and --summary.Junio C Hamano15-0/+2152