git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [wishlist] git submodule update --reset-hard

From
Stefan Beller <sbeller@google.com>
Date
Dec 10, 2018, 18:58 UTC
Message-ID
<CAGZ79kYDa27EFk4A9uEzCnoW7scjb1U8fKwCo0P7rUZESto+Qg@mail.gmail.com>
In-Reply-To
<20181208042139.GA4827@hopa.kiewit.dartmouth.edu>
On Fri, Dec 7, 2018 at 8:21 PM Yaroslav Halchenko <yoh@onerussian.com> wrote:
Show 19 quoted lines
>
>
> On Fri, 07 Dec 2018, Yaroslav Halchenko wrote:
>
>
> > On Fri, 07 Dec 2018, Stefan Beller wrote:
> > > > the initial "git submodule update --reset-hard" is pretty much a
> > > > crude workaround for some of those cases, so I would just go earlier in
> > > > the history, and redo some things, whenever I could just drop or revert
> > > > some selected set of commits.
>
> > > That makes sense.
> > > Do you want to give the implementation a try for the --reset-hard switch?
>
> > ok, will do, thanks for the blessing ;-)
>
> The patch is attached (please advise if should be done
> differently) and also submitted as PR
> https://github.com/git/git/pull/563

Yes, usually we send patches inline (Random example: https://public-inbox.org/git/244bdf2a6fc300f2b535ac8edfc2fbdaf5260266.1544465177.git.gitgitgadget@gmail.com/T/#u compared to https://public-inbox.org/git/20181208042139.GA4827@hopa.kiewit.dartmouth.edu/ (which I am replying to))

See Documentation/SubmittingPatches.

There are some tools that provide a GithubPR -> emailPatch workflow at https://github.com/gitgitgadget/git I think if you'd open your pull request there, then it would be automatically mailed to the list correctly.

I left some comments on the PR.
>
> I guess it would need more tests.
Writing tests is hard, as we don't know what we expect to break. ;-)
Show 8 quoted lines
> Took me some time to figure out
> why I was getting
>
>         fatal: bad value for update parameter
>
> after all my changes to the git-submodule.sh script after looking at an
> example commit 42b491786260eb17d97ea9fb1c4b70075bca9523 which introduced
> --merge to the update ;-)

Yeah I saw you also updated the submodule related C code, was that fatal message related to that?

Thanks, Stefan

Previous: Yaroslav HalchenkoNext: Yaroslav Halchenko
Message 9 of 18 in “[wishlist] git submodule update --reset-hard”
  1. Yaroslav HalchenkoDec 6, 2018
  2. Stefan BellerDec 6, 2018
  3. Yaroslav HalchenkoDec 6, 2018
  4. Stefan BellerDec 6, 2018
  5. Yaroslav HalchenkoDec 7, 2018
  6. Stefan BellerDec 7, 2018
  7. Yaroslav HalchenkoDec 8, 2018
  8. Yaroslav HalchenkoDec 8, 2018
  9. Stefan BellerDec 10, 2018
  10. Yaroslav HalchenkoDec 10, 2018
  11. 1/2 submodule: Add --reset-hard option for git submodule updateYaroslav Halchenko, Dec 11, 2018
  12. 2/2 RF+ENH(TST): compare the entire list of submodule status --recursive to stay intactYaroslav Halchenko, Dec 11, 2018
  13. Stefan BellerDec 12, 2018
  14. Yaroslav O HalchenkoDec 13, 2018
  15. Stefan BellerDec 13, 2018
  16. Yaroslav O HalchenkoDec 13, 2018
  17. Stefan BellerDec 13, 2018
  18. Yaroslav O HalchenkoDec 14, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.