From: Stefan Beller <sbeller@google.com>
To: debian@onerussian.com
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] RF+ENH(TST): compare the entire list of submodule status --recursive to stay intact
Date: Wed, 12 Dec 2018 11:48:41 -0800 [thread overview]
Message-ID: <CAGZ79kY17gmEh5Sawa+1fG5cXjOReOgCjDyEmGbbpJ5EE1APdw@mail.gmail.com> (raw)
In-Reply-To: <20181211040839.17472-2-debian@onerussian.com>
On Mon, Dec 10, 2018 at 8:09 PM Yaroslav Halchenko
<debian@onerussian.com> wrote:
Thanks for the patches. The first patch looks good to me!
> [PATCH 2/2] RF+ENH(TST): compare the entire list of submodule status --recursive to stay intact
The subject is a bit cryptic (specifically the first part before the
colon), maybe
t7406: compare entire submodule status for --reset-hard mode
?
> For submodule update --reset-hard the best test is comparison of the
> entire status as shown by submodule status --recursive. Upon update
> --reset-hard we should get back to the original state, with all the
> branches being the same (no detached HEAD) and commits identical to
> original (so no merges, new commits, etc).
"original state" can mean different things to different people. I'd think
we could be more precise:
... we should get to the state that the submodule is reset to the
object id as the superprojects gitlink points at, irrespective of the
submodule branch.
> test_expect_success 'submodule update --merge staying on master' '
> (cd super/submodule &&
> - git reset --hard HEAD~1
> + git reset --hard HEAD~1
unrelated white space change?
> ) &&
> (cd super &&
> (cd submodule &&
> @@ -307,16 +318,28 @@ test_expect_success 'submodule update --merge staying on master' '
> '
>
> test_expect_success 'submodule update --reset-hard staying on master' '
> [..]
> +'
> +
The tests look good to me, though I wonder if we'd rather want to inline
{record/compare}_submodule_status as then you'd not need to look it up
and the functions are rather short?
next prev parent reply other threads:[~2018-12-12 19:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 17:35 [wishlist] git submodule update --reset-hard Yaroslav Halchenko
2018-12-06 18:29 ` Stefan Beller
2018-12-06 21:24 ` Yaroslav Halchenko
2018-12-06 21:55 ` Stefan Beller
2018-12-07 1:22 ` Yaroslav Halchenko
2018-12-07 21:55 ` Stefan Beller
2018-12-08 2:15 ` Yaroslav Halchenko
2018-12-08 4:21 ` Yaroslav Halchenko
2018-12-10 18:58 ` Stefan Beller
2018-12-10 20:14 ` Yaroslav Halchenko
2018-12-11 4:08 ` [PATCH 1/2] submodule: Add --reset-hard option for git submodule update Yaroslav Halchenko
2018-12-11 4:08 ` [PATCH 2/2] RF+ENH(TST): compare the entire list of submodule status --recursive to stay intact Yaroslav Halchenko
2018-12-12 19:48 ` Stefan Beller [this message]
2018-12-13 16:42 ` Yaroslav O Halchenko
2018-12-13 20:44 ` Stefan Beller
2018-12-13 22:43 ` Yaroslav O Halchenko
2018-12-13 23:58 ` Stefan Beller
2018-12-14 4:22 ` Yaroslav O Halchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGZ79kY17gmEh5Sawa+1fG5cXjOReOgCjDyEmGbbpJ5EE1APdw@mail.gmail.com \
--to=sbeller@google.com \
--cc=debian@onerussian.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).