[Top][All Lists]

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

Re: [lmi] Avoiding a git-checkout failure

From: Vadim Zeitlin
Subject: Re: [lmi] Avoiding a git-checkout failure
Date: Tue, 28 Jul 2020 15:13:50 +0200

On Tue, 28 Jul 2020 12:51:49 +0000 Greg Chicares <gchicares@sbcglobal.net> 

GC> Vadim--On a machine in the office, yesterday we observed:
GC> [here, PWD is /srv/cache_for_lmi/vcs/wxWidgets]
GC>   git checkout "$wx_commit_sha"
GC>   + git checkout 6cdaedd42ba59331b3dc4ead50e0bac76ae14c19
GC>   error: Your local changes to the following files would be overwritten by 
GC>         .gitignore
GC>         .mailmap
GC>         .travis.yml
GC>         CMakeLists.txt
GC>         Makefile.in
GC> [...snip long list...]
GC>         build/msw/wx_vc8_wxtiff.vcproj
GC>         build/msw/wx_vc8_wxzlib.vcproj
GC>         build/msw/wx_vc8_xml.vcproj
GC>         build/msw/wx_vc8_xrc.vc
GC>   Please move or remove them before you switch branches.
GC>   Aborting

 This looks like a problem with permissions, due to either Git version
change or Git options change in ~/.gitconfig, i.e. maybe this checkout
predates the addition of "git config --global core.filemode true" to
install_msw.sh? I.e. I strongly suspect that if you run "git diff" in this
directory, you will see that the only changes are in the file mode.

GC> I'd guess this means that 'configure' had been run in this cache
GC> directory at some time, perhaps years ago.

 No, I don't think this would explain it.

GC> The patch below gets us past these failures, but before applying
GC> it I'd like to ask whether you have any objection. Any local
GC> modifications in our cache directory are sure to be unintentional.
GC> OTOH, wx developers regularly have local modifications, but most
GC> likely not in a /srv/cache_for_lmi/ directory.

 Yes, I don't think there is any problem with applying this patch. The only
objection I might have is that it should be unnecessary to do it, i.e.
there really shouldn't be any modifications to reset in the first place. If
my suspicion above is correct, you probably could just run this "git reset
--hard" once right now and not bother doing it in install_wx.sh itself.

 But, again, I don't have any real objections to applying it neither, as I
don't use lmi wx cache directory for anything, and so don't make any
changes there. In fact, I'd be glad to be able to avoid having another wx
checkout on my system (each of them is ~800MiB, which is not negligible),
but I don't think there is any way to tell lmi to use an existing directory
right now and if we ever add this, we could (and should) restrict the hard
reset command to only the branch in which an existing directory is not


Attachment: pgpTMRaUV_uvn.pgp
Description: PGP signature

reply via email to

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