[PATCH 0/2] Re: git diff --submodule=diff fails with submodules in a submodule

2017-03-31 Thread Stefan Beller
I came up with a patch that fixes the issue locally.
(It is the first patch, such that we can track the first patch down to maint)

While doing so, I noticed 2 issues:
* when having nested submodules, we probably want to have --submodule=diff
  to recurse into the nested submodules, so pass on the option.
  (2nd patch)
* the tests in t4060 hardcode hashes literally. I do not have a patch for that
  yet, but I will send patches later. (c.f. "sanitize_output" in t4202)
  
Thanks,
Stefan

Stefan Beller (2):
  diff: submodule inline diff to initialize env array.
  diff: recurse into nested submodules for inline diff

 submodule.c  |  4 +-
 t/t4060-diff-submodule-option-diff-format.sh | 70 
 2 files changed, 73 insertions(+), 1 deletion(-)

-- 
2.12.2.576.g7be6e4ba40.dirty



Re: git diff --submodule=diff fails with submodules in a submodule

2017-03-31 Thread Jacob Keller
On Fri, Mar 31, 2017 at 10:07 AM, Stefan Beller  wrote:
> +cc Jacob, who implemented --submodule=diff
>
> On Fri, Mar 31, 2017 at 8:40 AM, David Parrish  wrote:
>> When I try to run `git diff --submodule=diff` in a submodule which has
>> it's own submodules that have changes I get the error: fatal: bad
>> object
>
> Thanks for the bug report!
>
>> Let me know if you need an example reproduce the issue.
>
> I could reproduce it when playing around locally with a submodule in
> submodules. I think sub-submodule needs to have its HEAD moved from
> the recorded commit.
>
> Thanks,
> Stefan

Hmm. An example reproduction would be helpful. Ideally in the form of
a test ;) But otherwise whatever helps. I will try to look at this,
but I'm  busy for a few days.

Thanks,
Jake


Re: git diff --submodule=diff fails with submodules in a submodule

2017-03-31 Thread Stefan Beller
+cc Jacob, who implemented --submodule=diff

On Fri, Mar 31, 2017 at 8:40 AM, David Parrish  wrote:
> When I try to run `git diff --submodule=diff` in a submodule which has
> it's own submodules that have changes I get the error: fatal: bad
> object

Thanks for the bug report!

> Let me know if you need an example reproduce the issue.

I could reproduce it when playing around locally with a submodule in
submodules. I think sub-submodule needs to have its HEAD moved from
the recorded commit.

Thanks,
Stefan


git diff --submodule=diff fails with submodules in a submodule

2017-03-31 Thread David Parrish
When I try to run `git diff --submodule=diff` in a submodule which has
it's own submodules that have changes I get the error: fatal: bad
object

Let me know if you need an example reproduce the issue.

David