* git diff --submodule=diff fails with submodules in a submodule
@ 2017-03-31 15:40 David Parrish
2017-03-31 17:07 ` Stefan Beller
0 siblings, 1 reply; 5+ messages in thread
From: David Parrish @ 2017-03-31 15:40 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git diff --submodule=diff fails with submodules in a submodule
2017-03-31 15:40 git diff --submodule=diff fails with submodules in a submodule David Parrish
@ 2017-03-31 17:07 ` Stefan Beller
2017-03-31 17:31 ` Jacob Keller
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Beller @ 2017-03-31 17:07 UTC (permalink / raw)
To: David Parrish, Jacob Keller; +Cc: git@vger.kernel.org
+cc Jacob, who implemented --submodule=diff
On Fri, Mar 31, 2017 at 8:40 AM, David Parrish <daveparrish@gmail.com> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git diff --submodule=diff fails with submodules in a submodule
2017-03-31 17:07 ` Stefan Beller
@ 2017-03-31 17:31 ` Jacob Keller
2017-03-31 17:59 ` [PATCH] failure with diff --submodule=diff with moved nested submodule HEAD Stefan Beller
0 siblings, 1 reply; 5+ messages in thread
From: Jacob Keller @ 2017-03-31 17:31 UTC (permalink / raw)
To: Stefan Beller; +Cc: David Parrish, git@vger.kernel.org
On Fri, Mar 31, 2017 at 10:07 AM, Stefan Beller <sbeller@google.com> wrote:
> +cc Jacob, who implemented --submodule=diff
>
> On Fri, Mar 31, 2017 at 8:40 AM, David Parrish <daveparrish@gmail.com> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] failure with diff --submodule=diff with moved nested submodule HEAD
2017-03-31 17:31 ` Jacob Keller
@ 2017-03-31 17:59 ` Stefan Beller
2017-03-31 19:38 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Beller @ 2017-03-31 17:59 UTC (permalink / raw)
To: jacob.keller, daveparrish; +Cc: git, Stefan Beller
This fails reliable for me.
Signed-off-by: Stefan Beller <sbeller@google.com>
---
t/t4060-diff-submodule-option-diff-format.sh | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh
index 7e23b55ea4..89bced3484 100755
--- a/t/t4060-diff-submodule-option-diff-format.sh
+++ b/t/t4060-diff-submodule-option-diff-format.sh
@@ -746,4 +746,20 @@ test_expect_success 'diff --submodule=diff with .git file' '
test_cmp expected actual
'
+test_expect_success 'setup nested submodule' '
+ git submodule add -f ./sm2 &&
+ git commit -a -m "add sm2" &&
+ git -C sm2 submodule add ../sm2 &&
+ git -C sm2 commit -a -m "nested sub"
+'
+
+test_expect_success 'move nested submodule HEAD' '
+ git -C sm2/sm2 commit --allow-empty -m "new HEAD"
+'
+
+test_expect_success 'diff --submodule=diff with moved nested submodule HEAD' '
+ git -C sm2 diff --submodule=diff >actual 2>err &&
+ test_must_be_empty err
+'
+
test_done
--
2.12.2.511.g2abb8caf66
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] failure with diff --submodule=diff with moved nested submodule HEAD
2017-03-31 17:59 ` [PATCH] failure with diff --submodule=diff with moved nested submodule HEAD Stefan Beller
@ 2017-03-31 19:38 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2017-03-31 19:38 UTC (permalink / raw)
To: Stefan Beller; +Cc: jacob.keller, daveparrish, git
Stefan Beller <sbeller@google.com> writes:
> This fails reliable for me.
>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
I take it that this is a WIP for the testing half of the patch you
are working on (i.e. you are not just throwing a patch to document
known breakage to be fixed later, in which case these would have
been _expect_failure).
Thanks.
> t/t4060-diff-submodule-option-diff-format.sh | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh
> index 7e23b55ea4..89bced3484 100755
> --- a/t/t4060-diff-submodule-option-diff-format.sh
> +++ b/t/t4060-diff-submodule-option-diff-format.sh
> @@ -746,4 +746,20 @@ test_expect_success 'diff --submodule=diff with .git file' '
> test_cmp expected actual
> '
>
> +test_expect_success 'setup nested submodule' '
> + git submodule add -f ./sm2 &&
> + git commit -a -m "add sm2" &&
> + git -C sm2 submodule add ../sm2 &&
> + git -C sm2 commit -a -m "nested sub"
> +'
> +
> +test_expect_success 'move nested submodule HEAD' '
> + git -C sm2/sm2 commit --allow-empty -m "new HEAD"
> +'
> +
> +test_expect_success 'diff --submodule=diff with moved nested submodule HEAD' '
> + git -C sm2 diff --submodule=diff >actual 2>err &&
> + test_must_be_empty err
> +'
> +
> test_done
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-31 19:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 15:40 git diff --submodule=diff fails with submodules in a submodule David Parrish
2017-03-31 17:07 ` Stefan Beller
2017-03-31 17:31 ` Jacob Keller
2017-03-31 17:59 ` [PATCH] failure with diff --submodule=diff with moved nested submodule HEAD Stefan Beller
2017-03-31 19:38 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).