Hi All,
I have build.linux32ARM which is full of generated crap. I have renamed it to build.linux32ARMv6 via git mv build.linux32ARM build.linux32ARMv6. So far so good. Now I want to clone the clean state of build.linux32ARMv6 (or of https://github.com/OpenSmalltalk/vm/build.linux32ARMv6) to create the clean state of build.linux32ARMv7. But I can't?!?!?
In Subversion one can extract a subdirectory of the entire repository; great for Travis builds, where one doesn't waste time cloning the entire repository. Does git simply not support this? I see http://stackoverflow.com/questions/160608/do-a-git-export-like-svn-export but it doesn't appear to offer a solution beyond cloning the entire repository :-( _,,,^..^,,,_ best, Eliot
On Mon, Jun 27, 2016 at 11:08 AM, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi All,
I have build.linux32ARM which is full of generated crap. I have
renamed it to build.linux32ARMv6 via git mv build.linux32ARM build.linux32ARMv6. So far so good. Now I want to clone the clean state of build.linux32ARMv6 (or of https://github.com/OpenSmalltalk/vm/build.linux32ARMv6) to create the clean state of build.linux32ARMv7. But I can't?!?!?
In Subversion one can extract a subdirectory of the entire repository; great for Travis builds, where one doesn't waste time cloning the entire repository. Does git simply not support this? I see
http://stackoverflow.com/questions/160608/do-a-git-export-like-svn-export but it doesn't appear to offer a solution beyond cloning the entire repository :-( _,,,^..^,,,_ best, Eliot
BTW, my hack is to maintain a clone of the repository I'm calling oscogvm.clean, as a sibling of my oscogvm clone of OpenSmalltalk/vm, and when I want to access it I'll do a git pull and then copy what I want. Expensive, and error-prone, but functional.
_,,,^..^,,,_ best, Eliot
Hi Eliot On 27.06.2016, at 20:08, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi All,
I have build.linux32ARM which is full of generated crap. I have renamed it to build.linux32ARMv6 via git mv build.linux32ARM build.linux32ARMv6. So far so good. Now I want to clone the clean state of build.linux32ARMv6 (or of https://github.com/OpenSmalltalk/vm/build.linux32ARMv6) to create the clean state of build.linux32ARMv7. But I can't?!?!?
In Subversion one can extract a subdirectory of the entire repository; great for Travis builds, where one doesn't waste time cloning the entire repository. Does git simply not support this? I see http://stackoverflow.com/questions/160608/do-a-git-export-like-svn-export but it doesn't appear to offer a solution beyond cloning the entire repository :-(
I have not yet grasped your use case, please help me there.
You want to maintain both build.linux32ARMv6 and build.linux32ARMv7, but build.linux32ARMv7 is actually build.linux32ARM?
If so, what about:
mv build.linux32ARM build.linux32ARMv7 #note no git git checkout -- build.linux32ARM mv build.linux32ARM build.linux32ARMv6
and then `git add` the pieces of build.linux32ARMv6 and build.linux32ARMv7 as necessary and `commit` or replace the latter with `git mv`?
If it is only for local development to get a clean slate, it is quite similar, but leave out the `commit` or `git mv` part…
HTH
Best -Tobias
On Tue, Jun 28, 2016 at 2:08 AM, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi All,
I have build.linux32ARM which is full of generated crap. I have renamed it to build.linux32ARMv6 via git mv build.linux32ARM build.linux32ARMv6. So far so good. Now I want to clone the clean state of build.linux32ARMv6 (or of https://github.com/OpenSmalltalk/vm/build.linux32ARMv6) to create the clean state of build.linux32ARMv7. But I can't?!?!?
I was curious to learn the answer to this, so I found these...
Stack Overflow, Record file copy operation with Git: Git does not do rename tracking nor copy tracking, which means it doesn't record renames or copies. What it does instead is rename and copy detection http://stackoverflow.com/questions/1043388/record-file-copy-operation-with-g...
One of the things Git gets right: Fancy file rename and copy detection deduced merely by looking at the commit graph. It doesn't need any metadata to be stored. If you store metadata, you're locking yourself into the best algorithms you had at the time of storage; if you forget metadata and instead deduce you can always use the very best algorithms available at the time you examine the history. http://www.wincent.com/a/about/wincent/weblog/archives/2007/11/one_of_the_th...
Git Mail List, How to fork a file (git cp ?) Øyvind A. Holm response: Git has a rename command git mv, but that is just for convenience. The effect is indistinguishable from removing the file and adding another with different name and the same content http://git.661346.n2.nabble.com/How-to-fork-a-file-git-cp-td6331860.html
Code Archaeology With Git: takes a look at techniques for separating the interesting commits from the uninteresting ones http://jfire.io/blog/2012/03/07/code-archaeology-with-git/
Configure git diff to default to rename and copy detection: git config --global diff.renames copies http://nuclearsquid.com/writings/git-tricks-tips-workflows/
In Subversion one can extract a subdirectory of the entire repository; great for Travis builds, where one doesn't waste time cloning the entire repository. Does git simply not support this? I see http://stackoverflow.com/questions/160608/do-a-git-export-like-svn-export but it doesn't appear to offer a solution beyond cloning the entire repository :-(
Build systems can use a shallow clone... git clone --depth depth remote-url or single branch clone... git clone URL --branch branch_name --single-branch [folder] http://blogs.atlassian.com/2014/05/handle-big-repositories-git/
cheers -ben
On Tue, Jun 28, 2016 at 8:28 AM, Ben Coman btc@openinworld.com wrote:
On Tue, Jun 28, 2016 at 2:08 AM, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi All,
I have build.linux32ARM which is full of generated crap. I have renamed it to build.linux32ARMv6 via git mv build.linux32ARM build.linux32ARMv6. So far so good. Now I want to clone the clean state of build.linux32ARMv6 (or of https://github.com/OpenSmalltalk/vm/build.linux32ARMv6) to create the clean state of build.linux32ARMv7. But I can't?!?!?
I was curious to learn the answer to this, so I found these...
Stack Overflow, Record file copy operation with Git: Git does not do rename tracking nor copy tracking, which means it doesn't record renames or copies. What it does instead is rename and copy detection http://stackoverflow.com/questions/1043388/record-file-copy-operation-with-g...
One of the things Git gets right: Fancy file rename and copy detection deduced merely by looking at the commit graph. It doesn't need any metadata to be stored. If you store metadata, you're locking yourself into the best algorithms you had at the time of storage; if you forget metadata and instead deduce you can always use the very best algorithms available at the time you examine the history. http://www.wincent.com/a/about/wincent/weblog/archives/2007/11/one_of_the_th...
Git Mail List, How to fork a file (git cp ?) Øyvind A. Holm response: Git has a rename command git mv, but that is just for convenience. The effect is indistinguishable from removing the file and adding another with different name and the same content http://git.661346.n2.nabble.com/How-to-fork-a-file-git-cp-td6331860.html
Code Archaeology With Git: takes a look at techniques for separating the interesting commits from the uninteresting ones http://jfire.io/blog/2012/03/07/code-archaeology-with-git/
Configure git diff to default to rename and copy detection: git config --global diff.renames copies http://nuclearsquid.com/writings/git-tricks-tips-workflows/
In Subversion one can extract a subdirectory of the entire repository; great for Travis builds, where one doesn't waste time cloning the entire repository. Does git simply not support this? I see http://stackoverflow.com/questions/160608/do-a-git-export-like-svn-export but it doesn't appear to offer a solution beyond cloning the entire repository :-(
Build systems can use a shallow clone... git clone --depth depth remote-url or single branch clone... git clone URL --branch branch_name --single-branch [folder] http://blogs.atlassian.com/2014/05/handle-big-repositories-git/
cheers -ben
A couple more useful reads...
gitdiffcore(7) - Linux man page Authoritative reference, with worked example. scroll down to... DIFFCORE-RENAME http://linux.die.net/man/7/gitdiffcore
Git Secrets Revealed Git heuristically ferrets out renames and copies between successive versions. In fact, it can detect chunks of code being moved or copied around between files! [Also read the short section on "Blobs"] http://www-cs-students.stanford.edu/~blynn/gitmagic/ch08.html
I'm not at a computer where I can test this, but in summary I would just try... $ git checkout -b splitARM Cog $ mv build.linux32ARM build.linux32ARMv6 $ cp -r build.linux32ARMv6 build.linux32ARMv7 $ git add build.linux32ARMv6 build.linux32ARMv7 $ git commit -m "Split ARM build into ARMv6/ARMv7" $ git diff -M -C --summary Cog
You might first want to $ cp -r oscogvm oscogvm.practice
cheers -ben
Hi,
On 28 Jun 2016, at 02:57, Ben Coman btc@openInWorld.com wrote:
I'm not at a computer where I can test this, but in summary I would just try... $ git checkout -b splitARM Cog $ mv build.linux32ARM build.linux32ARMv6 $ cp -r build.linux32ARMv6 build.linux32ARMv7 $ git add build.linux32ARMv6 build.linux32ARMv7 $ git commit -m "Split ARM build into ARMv6/ARMv7" $ git diff -M -C --summary Cog
I’m not sure either what’s the purpose of checking out just a directory… in git, since it does global versions for commits, it does not has much sense… also git is designed to do the branching a very easy/efficient task open a new branch… and then merging back is a second-time task). So I suppose this is the right way to do it… I imagine that different tools means sometimes different ways of doing things, and forcing “old way” can be not as effective as it was before.
+1 for this step list :)
You might first want to $ cp -r oscogvm oscogvm.practice
why? if you made a mistake you can just kill the branch :)
Esteban
On Tue, Jun 28, 2016 at 3:21 PM, Esteban Lorenzano estebanlm@gmail.com wrote:
Hi,
On 28 Jun 2016, at 02:57, Ben Coman btc@openInWorld.com wrote:
I'm not at a computer where I can test this, but in summary I would just try... $ git checkout -b splitARM Cog $ mv build.linux32ARM build.linux32ARMv6 $ cp -r build.linux32ARMv6 build.linux32ARMv7 $ git add build.linux32ARMv6 build.linux32ARMv7 $ git commit -m "Split ARM build into ARMv6/ARMv7" $ git diff -M -C --summary Cog
I’m not sure either what’s the purpose of checking out just a directory… in git, since it does global versions for commits, it does not has much sense… also git is designed to do the branching a very easy/efficient task open a new branch… and then merging back is a second-time task). So I suppose this is the right way to do it… I imagine that different tools means sometimes different ways of doing things, and forcing “old way” can be not as effective as it was before.
+1 for this step list :)
You might first want to $ cp -r oscogvm oscogvm.practice
why? if you made a mistake you can just kill the branch :)
You are right. But it can give a bit a freedom while experimenting to build confidence with a new system. cheers -ben
Hi Esteban,
On Jun 28, 2016, at 12:21 AM, Esteban Lorenzano estebanlm@gmail.com wrote:
Hi,
On 28 Jun 2016, at 02:57, Ben Coman btc@openInWorld.com wrote:
I'm not at a computer where I can test this, but in summary I would just try... $ git checkout -b splitARM Cog $ mv build.linux32ARM build.linux32ARMv6 $ cp -r build.linux32ARMv6 build.linux32ARMv7 $ git add build.linux32ARMv6 build.linux32ARMv7 $ git commit -m "Split ARM build into ARMv6/ARMv7" $ git diff -M -C --summary Cog
I’m not sure either what’s the purpose of checking out just a directory… in git, since it does global versions for commits, it does not has much sense… also git is designed to do the branching a very easy/efficient task open a new branch… and then merging back is a second-time task).
At Cadence there are automatic build of only VMs derived from nsspursrc and only on build.linux32x86, so when we were on subversion we would check out these and processors and build and save time and space. Now we have to check out the whole thing.
So I suppose this is the right way to do it… I imagine that different tools means sometimes different ways of doing things, and forcing “old way” can be not as effective as it was before.
+1 for this step list :)
You might first want to $ cp -r oscogvm oscogvm.practice
why? if you made a mistake you can just kill the branch :)
+1
Esteban
vm-dev@lists.squeakfoundation.org