lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] "Subproject commit" [Was: Tests PR 174]


From: Greg Chicares
Subject: [lmi] "Subproject commit" [Was: Tests PR 174]
Date: Fri, 22 Oct 2021 23:38:04 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

I'm almost ready to push your PR 193 changes, but now that
I've cherry-picked them all, git-diff reports:

diff --git a/third_party/wx b/third_party/wx
index efd7bf881..c9486f9ce 160000
--- a/third_party/wx
+++ b/third_party/wx
@@ -1 +1 @@
-Subproject commit efd7bf881e9b5fceca6ceaf1edba072a56de971b
+Subproject commit c9486f9cebb2843fdd3cb3e6433045644c456e38

...so I looked in the archives:

On 3/24/21 9:22 PM, Vadim Zeitlin wrote:
> On Wed, 24 Mar 2021 19:43:41 +0000 Greg Chicares <gchicares@sbcglobal.net> 
> wrote:
[...]
> GC> As the commit message explains, I did this:
> GC> 
> GC> $git cherry-pick e571a6e11..2769d69ba xanadu/automake-libtest
> GC> $git status                                                  
> GC> On branch master
> GC> Your branch is ahead of 'origin/master' by 28 commits.
> GC>   (use "git push" to publish your local commits)
> GC> 
> GC> Changes not staged for commit:
> GC>   (use "git add <file>..." to update what will be committed)
> GC>   (use "git restore <file>..." to discard changes in working directory)
> GC>         modified:   third_party/wx (new commits)
> GC> 
> GC> and blindly followed the "git add" advice.
> 
>  It tells you to add the files you want to commit, but you don't want to
> commit your local submodule in this situation because it hasn't been
> updated to the version in the previous commit.

I'm working in two chroots right now (old-testing and new-testing:
I can't remember the Toy Story names because they all start with "B").
In the newer one, I think git-diff will look clean, but it'll take
an hour to regenerate it from scratch so I'm not sure yet.

In the older one, the quotation at the top of this email shows what
git-status reports. I don't want to rebuild wx in this chroot yet,
but I need git-diff to be clean so that I can't accidentally commit
something wrong. I know I did the wrong thing last time, so...

>  One of the confusing things about git submodules is that they, unlike
> normal files, are not updated automatically. This makes sense because
> updating a submodule is much, much more expensive than updating a single
> file, so you wouldn't want this to happen automatically when using many
> and/or big submodules (and wx is big enough already), but, again, it is
> confusing.
> 
>  Instead you need to update the submodules manually whenever they are
> modified by a commit not done by you (if you had committed the submodule
> yourself, it is already at the right version). This is done using
> "git submodule update third_party/wx" command or, if you want to save on
> typing, just "git submodule update", which updates all submodules.

Okay, that's what I'll do when I'm ready. Tonight, though, I just
want to get rid of the change that git-diff reports, so...

> GC> Now it looks
> GC> like I should have ignored it...and instead have used
> GC> "git restore" to discard it? Is that the proper way to
> GC> get git-status to report that everything's clean?
> 
>  Yes, please see above.

Should I now do:
  git checkout -- third_party/wx
? (I suppose there's a git-restore alternative that's clearer,
but having sprauchled so far up the git-checkout learning curve,
I'm reluctant to invest more time learning something else.)

And later, when I do
  git submodule update third_party/wx
will that just DTRT?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]