Am Mittwoch, 4. Januar 2017, 19:33:27 CET schrieb Ulrich Pegelow: > Well, that's an option. But I almost already hear the screams when > people screw things up by using force at the wrong place.
I don't like it either. One reason more to not use branches. > Ulrich Tobias > Am 04.01.2017 um 19:15 schrieb Roman Lebedev: > > So: > > > > ~/darktable$ git describe > > release-2.3.0-150-gec88795ce > > $ git submodule status > > 8c0a57825a6e209b109ac18f8ba6966b36c596eb src/external/rawspeed > > (heads/develop) ~/darktable$ ls -lah src/external/rawspeed/CMakeLists.txt > > -rw-r--r-- 1 lebedevri lebedevri 1.9K Jan 4 20:57 > > src/external/rawspeed/CMakeLists.txt > > > > We are with working git master, with working submodule. > > > > ~/darktable$ git checkout darktable-2.2.x > > error: The following untracked working tree files would be overwritten > > > > by checkout: > > bla bla bla > > > > Please move or remove them before you switch branches. > > Aborting > > > > git does want us to accidentally loose data, so it warns us. > > Since we know that it is expected, we have two ways: > > WAY ONE: > > > > ~/darktable$ git checkout darktable-2.2.x -f > > warning: unable to rmdir src/external/rawspeed: Directory not empty > > Switched to branch 'darktable-2.2.x' > > Your branch is up-to-date with 'upstream/darktable-2.2.x'. > > ~/darktable$ git describe > > release-2.2.1-3-g4596f0b5d > > ~/darktable$ ls -lah src/external/rawspeed/CMakeLists.txt > > -rw-r--r-- 1 lebedevri lebedevri 4.7K Jan 4 20:58 > > src/external/rawspeed/CMakeLists.txt > > > > We are with working git stable branch. > > > > Let's get back to master: > > > > ~/darktable$ git checkout master > > M src/external/rawspeed > > Switched to branch 'master' > > Your branch is up-to-date with 'origin/master'. > > ~/darktable$ git describe > > release-2.3.0-150-gec88795ce > > ~/darktable$ git submodule status > > > > 8c0a57825a6e209b109ac18f8ba6966b36c596eb src/external/rawspeed > > (heads/develop)> > > ~/darktable$ ls -lah src/external/rawspeed/CMakeLists.txt > > ls: cannot access 'src/external/rawspeed/CMakeLists.txt': No such file > > or directory > > > > Oops, git did not auto-handle the submodule, let's do that manually > > > > ~/darktable$ git submodule update > > ~/darktable$ git submodule status > > > > 8c0a57825a6e209b109ac18f8ba6966b36c596eb src/external/rawspeed > > (heads/develop)> > > ~/darktable$ ls -lah src/external/rawspeed/CMakeLists.txt > > ls: cannot access 'src/external/rawspeed/CMakeLists.txt': No such file > > or directory > > > > Let's re-try with -f > > > > ~/darktable$ git submodule update -f > > Submodule path 'src/external/rawspeed': checked out > > '8c0a57825a6e209b109ac18f8ba6966b36c596eb' > > ~/darktable$ git submodule status > > > > 8c0a57825a6e209b109ac18f8ba6966b36c596eb src/external/rawspeed > > (heads/develop)> > > ~/darktable$ ls -lah src/external/rawspeed/CMakeLists.txt > > -rw-r--r-- 1 lebedevri lebedevri 1.9K Jan 4 20:59 > > src/external/rawspeed/CMakeLists.txt > > ~/darktable$ > > > > And we're back to git master! > > > > Summary: so even with normal operations, -f is needed... > > > > WAY TWO: > > ~/darktable$ rm -rf src/external/rawspeed > > ~/darktable$ git checkout darktable-2.2.x > > Switched to branch 'darktable-2.2.x' > > Your branch is up-to-date with 'upstream/darktable-2.2.x'. > > ~/darktable$ git describe > > release-2.2.1-3-g4596f0b5d > > ~/darktable$ git submodule status > > ~/darktable$ ls -lah src/external/rawspeed/CMakeLists.txt > > -rw-r--r-- 1 lebedevri lebedevri 4.7K Jan 4 21:02 > > src/external/rawspeed/CMakeLists.txt > > > > We are with working git stable branch. > > > > Let's get back to master: > > > > ~/darktable$ git checkout master > > Switched to branch 'master' > > Your branch is up-to-date with 'origin/master'. > > ~/darktable$ git describe > > release-2.3.0-150-gec88795ce > > ~/darktable$ git submodule status > > -8c0a57825a6e209b109ac18f8ba6966b36c596eb src/external/rawspeed > > ~/darktable$ ls -lah src/external/rawspeed/CMakeLists.txt > > ls: cannot access 'src/external/rawspeed/CMakeLists.txt': No such file > > or directory > > > > ~/darktable$ git submodule update > > Cloning into '/home/lebedevri/darktable/src/external/rawspeed'... > > Submodule path 'src/external/rawspeed': checked out > > '8c0a57825a6e209b109ac18f8ba6966b36c596eb' > > > > So it will need to re-clone rawspeed. > > Note: git submodule update takes --reference= parameter, > > you may want to pass --reference > > ~/darktable/.git/modules/src/external/rawspeed/ which is where git put > > the submodule repo by default > > > > ~/darktable$ git submodule status > > > > 8c0a57825a6e209b109ac18f8ba6966b36c596eb src/external/rawspeed > > (heads/develop)> > > ~/darktable$ ls -lah src/external/rawspeed/CMakeLists.txt > > -rw-r--r-- 1 lebedevri lebedevri 1.9K Jan 4 21:03 > > src/external/rawspeed/CMakeLists.txt > > ~/darktable$ > > > > And we're back to git master! > > > > Summary: no -f, but it re-clones the submodule. > > > > TLDR: just use git checkout -f and git submodule update -f > > > > Roman. > > > > On Wed, Jan 4, 2017 at 8:37 PM, Ulrich Pegelow > > > > <ulrich.pege...@tongareva.de> wrote: > >> Hi, > >> > >> that recent move has now screwed everything here :( > >> > >> If I want to build: > >> > >> CMake Error at src/external/CMakeLists.txt:4 (add_subdirectory): > >> The source directory > >> > >> /home/pegelow/darktable/src/external/rawspeed > >> > >> does not contain a CMakeLists.txt file. > >> > >> and ./build.sh aborts (and I did what has been suggested by Wolfgang > >> before). > >> > >> > >> If I want to checkout an earlier commit to get away from this rawspeed > >> thing: > >> > >> git checkout 693ae87b4dfd0c291969e2043c606935bf55fca5 > >> error: The following untracked working tree files would be overwritten by > >> > >> checkout: > >> src/external/rawspeed/data/cameras.xml > >> > >> Please move or remove them before you can switch branches. > >> Aborting > >> > >> All I did was going to darktable-2.2.x branch in-between. > >> > >> WTF? > >> > >> Steps like this really need a preparation with clear usage instructions! > >> Right now I'm out with no further clues. > >> > >> Ulrich > >> > >> Am 02.01.2017 um 22:27 schrieb Roman Lebedev: > >>> Hi everyone. > >>> > >>> Starting with today, darktable git master tracks rawspeed > >>> library as a submodule. > >>> > >>> Which means, after updating darktable repo (git pull/git fetch), > >>> and before building, you now need to make sure that the > >>> submodule is updated to. > >>> > >>> After fresh clone, you need to run this once: > >>> $ git submodule update --init > >>> > >>> And day-to-day, after git pull for darktable > >>> (i'm not 100% sure about the exact command, > >>> someone with more knowledge please do chime in) > >>> $ cd src/external/rawspeed && git pull && \ > >>> > >>> git checkout -f && git submodule update -f > >>> > >>> Roman. > > ___________________________________________________________________________ > darktable developer mailing list > to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org
signature.asc
Description: This is a digitally signed message part.