lmi
[Top][All Lists]
Advanced

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

Re: [lmi] PATCH for wxPdfDoc: ignore 'autom4te.cache' artifacts


From: Vadim Zeitlin
Subject: Re: [lmi] PATCH for wxPdfDoc: ignore 'autom4te.cache' artifacts
Date: Fri, 16 Oct 2020 01:55:25 +0200

On Thu, 15 Oct 2020 22:18:53 +0000 Greg Chicares <gchicares@sbcglobal.net> 
wrote:

GC> Similarly, building wxPdfDoc leaves artifacts in an 'autom4te.cache'
GC> directory. The attached patch is my attempt to fix this in a way
GC> consonant with wxWidgets.

 This is the right way to do it, I don't know of any advantage of using the
extra "/*", so I don't think it's needed.

GC> I still have a detached HEAD:
GC> 
GC>   $ /opt/lmi/src/lmi/third_party/wxpdfdoc[0]$git status                     
               
GC>   HEAD detached from acbd019
GC>   nothing to commit, working tree clean
GC> 
GC> and it feels weird to push in that state, but I'll try anyway.

 If you want to skip all the explanatory fluff, please goto "this command:"
below.

<section-safe-to-skip>
 Congratulations, you've fallen into the first trap of using Git
submodules! This is an important learning experience, although for best
effect you really need to do it with a public repository used by hundreds
if not thousands of people, such as wxWidgets, rather than a relatively
confidential one such as lmi.

 Let me explain: if you try to do a full checkout of lmi repository, with
the submodules (i.e. using "git clone --recurse-submodules"), it will
currently fail because the main repository contains a reference to the
commit 974133eebd78a8311bf030cc639619927c152904 in
https://github.com/let-me-illustrate/wxpdfdoc.git repository (which is
recorded as the submodule URL in .gitmodules), but this commit doesn't
exist in this repository because you didn't push it there, so trying to
clone the repository will fail with an error. And, in fact, this is exactly
what happens in the CI builds, as you can see at

        https://github.com/let-me-illustrate/lmi/actions/runs/309551348


 Normally the solution is to:

1. Check out "lmi" branch in the submodule (this is just what I've used
   for clarity, there is no rule saying that this branch should be called
   "lmi" or anything else).
2. Fast forward it to 974133eebd78a8311bf030cc639619927c152904 (ideally
   you would have done this commit on this branch, and then you wouldn't
   have to fast forward anything).
3. Push this branch, including this commit, to the repository above.

And, again, normally you should do this _before_ pushing the main
repository out as until you do this, nobody else is going to be able to
update the submodule. Of course, it's difficult to never forget it and,
like with many other footguns built into it, Git provides a way to avoid it
by setting push.recurseSubmodules option to "check". So I recommend running
this command: // <-- goto here </section-safe-to-skip>

        $ git config --global push.recurseSubmodules check

to not run into this problem ever again. Sorry for forgetting to mention
this before, but I didn't think you would be modifying the submodules yet.

 And the reason I thought you wouldn't do it is due to the fact that you
currently don't have write access to let-me-illustrate/wxpdfdoc repository
on GitHub. So you won't be able to push to it, unless you create a GitHub
account and become a member (and also owner...) of the let-me-illustrate
organization. If you don't want to do this right now, I will have to push
your commit to it for you, but this will, of course, change its SHA-1, and
so will require another commit to lmi repository itself. This is not really
a problem, but please let me know if you'd like me to do this right now or
if you prefer to obtain write access to the repository yourself.

 Thanks,
VZ

Attachment: pgpFlZkbZyIz1.pgp
Description: PGP signature


reply via email to

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