git commit vs. ignore-submodules

2014-03-27 Thread Ronald Weiss
ry. So please, let me first know, whether you could possibly accept such patch, and if so, then I'd really appreciate some hints on how to do it. And also, I'd like to know git folks' opinion on whether it's OK that git commit with ignore=all in .gitmodules ignores submo

Re: git commit vs. ignore-submodules

2014-03-29 Thread Ronald Weiss
On Fri, Mar 28, 2014 at 5:47 PM, Jens Lehmann wrote: > Such a patch would be very much appreciated. You might want to look > into other commands that already have the --ignore-submodules option > to get an idea how to do that. cmd_status() in builtin/commit.c > should be a good starting point. OK

[PATCH 1/2] commit: add --ignore-submodules[=] parameter

2014-03-29 Thread Ronald Weiss
ave same effect as 'none', as commit is only interested in whether the submodule's HEAD differs from what is commited in the superproject. Changes in add.c and cache.h (and related compilo fix in checkout.c) are needed to make it work for "commit -a" too. Signed-of

[PATCH 2/2] status: don't ignore submodules added to index

2014-03-29 Thread Ronald Weiss
are commited. Unless the changed submodules are the only changes in the index, in such case commit fails immediately with "no changes", which is even worse. Signed-off-by: Ronald Weiss --- wt-status.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wt-sta

Re: [PATCH 2/2] status: don't ignore submodules added to index

2014-03-29 Thread Ronald Weiss
On 30. 3. 2014 0:16, Jens Lehmann wrote: > Thanks, but I think this patch falls a bit short (I assume you should see > test failures with this patch). I'm currently working on fixing that, will > post that as soon as I finished it. You're right, 3 tests from t7508 failed with that, I'm sorry for n

Re: [PATCH 2/2] status: don't ignore submodules added to index

2014-03-29 Thread Ronald Weiss
On 30. 3. 2014 0:40, Ronald Weiss wrote: That change was really too aggresive, the one below seems better, all tests pass with it, and it still works. Oops, some tests still fail, sorry for my blindness. Nevermind, I'm looking forward to Your fix. -- To unsubscribe from this list: sen

[PATCH v2] commit: add --ignore-submodules[=] parameter

2014-03-30 Thread Ronald Weiss
ave same effect as 'none', as commit is only interested in whether the submodule's HEAD differs from what is commited in the superproject. Changes in add.c and cache.h (and related compilo fix in checkout.c) are needed to make it work for "commit -a" too. Signed-off-by: R

[PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-03-30 Thread Ronald Weiss
ave same effect as 'none', as commit is only interested in whether the submodule's HEAD differs from what is commited in the superproject. Changes in add.c and cache.h (and related compilo fix in checkout.c) are needed to make it work for "commit -a" too. Signed-off-by:

Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-03-31 Thread Ronald Weiss
On Mon, Mar 31, 2014 at 8:58 PM, Jens Lehmann wrote: > As Junio mentioned it would be great if you could teach the add > command also honor the --ignore-submodule command line option in > a companion patch. In the course of doing so you'll easily see if > I was right or not, then please just order

Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-03-31 Thread Ronald Weiss
On Mon, Mar 31, 2014 at 10:37 PM, Jens Lehmann wrote: > ... maybe the best way is to leave index_differs_from() unchanged > and call that function with the correct diff_flags instead: > > + int diff_flags = DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG; > + if (ignore_submodule_ar

Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-03-31 Thread Ronald Weiss
On 31. 3. 2014 23:47, Ronald Weiss wrote: > On Mon, Mar 31, 2014 at 8:58 PM, Jens Lehmann wrote: >> As Junio mentioned it would be great if you could teach the add >> command also honor the --ignore-submodule command line option in >> a companion patch. In the course of doing

Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-03-31 Thread Ronald Weiss
On 1. 4. 2014 0:50, Ronald Weiss wrote: On 31. 3. 2014 23:47, Ronald Weiss wrote: On Mon, Mar 31, 2014 at 8:58 PM, Jens Lehmann wrote: As Junio mentioned it would be great if you could teach the add command also honor the --ignore-submodule command line option in a companion patch. In the

Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-04-01 Thread Ronald Weiss
On 1. 4. 2014 22:23, Jens Lehmann wrote: > Am 01.04.2014 01:35, schrieb Ronald Weiss: >> On 1. 4. 2014 0:50, Ronald Weiss wrote: >>> On 31. 3. 2014 23:47, Ronald Weiss wrote: >>>> On Mon, Mar 31, 2014 at 8:58 PM, Jens Lehmann wrote: >>>>> As Junio m

Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-04-02 Thread Ronald Weiss
On 2. 4. 2014 20:53, Jens Lehmann wrote: > Am 01.04.2014 23:59, schrieb Ronald Weiss: >> On 1. 4. 2014 22:23, Jens Lehmann wrote: >>> Am 01.04.2014 01:35, schrieb Ronald Weiss: >>>> On 1. 4. 2014 0:50, Ronald Weiss wrote: >>>>> On 31. 3. 2014 23:47, Ro

Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-04-07 Thread Ronald Weiss
On 6. 4. 2014 18:28, Jens Lehmann wrote: > Am 02.04.2014 21:56, schrieb Ronald Weiss: >> On 2. 4. 2014 20:53, Jens Lehmann wrote: >>> Am 01.04.2014 23:59, schrieb Ronald Weiss: >>>> On 1. 4. 2014 22:23, Jens Lehmann wrote: >>>>> Am 01.04.2014 01:35, sc

[PATCH v3 1/2] add: add --ignore-submodules[=] parameter

2014-04-07 Thread Ronald Weiss
r other commands using this function (for commit command, in particular, coming in subsequent commit). This requires compilo fixes in checkout.c and commit.c Signed-off-by: Ronald Weiss --- I have changed order of commits, from what Jens proposed, to avoid the patch for commit (coming right after t

[PATCH v3 2/2] commit: add --ignore-submodules[=] parameter

2014-04-07 Thread Ronald Weiss
ommit -m --ignore-submodules" would not work and tests introduced here would fail. Signed-off-by: Ronald Weiss --- Documentation/git-commit.txt| 6 ++ builtin/commit.c| 8 ++- t/t7513-commit-ignore-submodules.sh | 42 ++

Re: [PATCH v3 2/2] commit: add --ignore-submodules[=] parameter

2014-04-08 Thread Ronald Weiss
On 8. 4. 2014 20:43, Jens Lehmann wrote: > Am 08.04.2014 01:03, schrieb Ronald Weiss: >> Git commit honors the 'ignore' setting from .gitmodules or .git/config, >> but didn't allow to override it from command line, like other commands do. >> >> Useful

Re: [PATCH v3 2/2] commit: add --ignore-submodules[=] parameter

2014-04-12 Thread Ronald Weiss
On 8. 4. 2014 20:43, Jens Lehmann wrote: Useful values for commit are 'all' (default) or 'none'. The others ('dirty' and 'untracked') have same effect as 'none', as commit is only interested in whether the submodule's HEAD differs from what is commited in the superproject. Unless it outputs a

[PATCH v4 1/2] add: add --ignore-submodules[=] parameter

2014-04-12 Thread Ronald Weiss
te for the next one in series, which adds the --ignore-submodules switch to git commit. That's why signature of function add_files_to_cache was changed. That also requires compilo fixes in checkout.c and commit.c Signed-off-by: Ronald Weiss --- Documentation/git-add.txt| 7 ++-

[PATCH v4 2/2] commit: add --ignore-submodules[=] parameter

2014-04-12 Thread Ronald Weiss
commit staged submodules regardless of ignore config". Without it, "commit -m --ignore-submodules" would not work and tests introduced here would fail. Signed-off-by: Ronald Weiss --- Documentation/git-commit.txt| 7 builtin/commit.c| 8 +++-

Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-04-12 Thread Ronald Weiss
On 8. 4. 2014 20:26, Jens Lehmann wrote: > Am 07.04.2014 23:46, schrieb Ronald Weiss: >> Then, on top of that, I'll prepare patches for add to honor ignore >> from .gitmodules, and -f implying --ignore-submodules. That might need >> more discussion, let's see. &g

Re: [PATCH v3 2/2] commit: add --ignore-submodules[=] parameter

2014-04-14 Thread Ronald Weiss
On 14. 4. 2014 20:30, Junio C Hamano wrote: > Ronald Weiss writes: > >> On 8. 4. 2014 20:43, Jens Lehmann wrote: >>>> Useful values for commit are 'all' (default) or 'none'. The others >>>> ('dirty' and 'untracked')

Re: [PATCH v4 1/2] add: add --ignore-submodules[=] parameter

2014-04-21 Thread Ronald Weiss
On 18. 4. 2014 13:53, Jens Lehmann wrote: > Am 13.04.2014 00:45, schrieb Ronald Weiss: >> Allow ignoring submodules (or not) by command line switch, like diff >> and status do. >> >> Git add currently doesn't honor ignore from .gitmodules or .git/config, >> w

Re: [PATCH v4 2/2] commit: add --ignore-submodules[=] parameter

2014-04-21 Thread Ronald Weiss
On 18. 4. 2014 14:09, Jens Lehmann wrote: > Am 13.04.2014 00:49, schrieb Ronald Weiss: >> Allow ignoring submodules (or not) by command line switch, like diff >> and status do. >> >> Git commit honors the 'ignore' setting from .gitmodules or .git/config, &g

[PATCH v5 1/2] add: add --ignore-submodules[=] parameter

2014-04-22 Thread Ronald Weiss
x27;s call sites are updated to pass NULL. Signed-off-by: Ronald Weiss --- Git add currently doesn't honor ignore setting from .gitmodules or .git/config, which is related functionality, however I'd like to change that in another patch, coming soon. Changes against v4 of this patch: * fixe

[PATCH v5 2/2] commit: add --ignore-submodules[=] parameter

2014-04-22 Thread Ronald Weiss
commit staged submodules regardless of ignore config". Without it, "commit -m --ignore-submodules" would not work and tests introduced here would fail. Signed-off-by: Ronald Weiss --- Changes against v4 of this patch: * fixed file mode of added test script (644 -> 755) * replaced test_mi

Re: [PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-04-22 Thread Ronald Weiss
On 18. 4. 2014 14:28, Jens Lehmann wrote: > Am 13.04.2014 01:41, schrieb Ronald Weiss: >> Second, there are some differences between adding standard ignored >> files, and ignored submodules: >> >> 1) Already tracked files are never ignored, regardless of .gitig

[PATCH v6 1/2] add: add --ignore-submodules[=] parameter

2014-04-24 Thread Ronald Weiss
call sites are updated to pass NULL. Signed-off-by: Ronald Weiss --- Git add currently doesn't honor ignore setting from .gitmodules or .git/config, which is related functionality, however I'd like to change that in another patch, coming soon. Patch changelog: v6 * corrected wording and fo

[PATCH v6 2/2] commit: add --ignore-submodules[=] parameter

2014-04-24 Thread Ronald Weiss
commit staged submodules regardless of ignore config". Without it, "commit -m --ignore-submodules" would not work and tests introduced here would fail. Signed-off-by: Ronald Weiss --- Patch changelog: v6 * corrected wording and formatting errors (as pointed out by Eric Sunshine) v5 * f