<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 13, 2016, at 11:36 AM, Renato Golin <<a href="mailto:renato.golin@linaro.org" class="">renato.golin@linaro.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 13 October 2016 at 19:09, Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" class="">mehdi.amini@apple.com</a>> wrote:<br class=""><blockquote type="cite" class="">When I reach a commit that moved the function, I switch file, but continue<br class="">*from the same commit*. This is only possible in the same repository.<br class=""></blockquote><br class="">Due to their physical separation, I don't think people have been<br class="">moving code between projects in that manner.<br class=""></div></div></blockquote><div><br class=""></div><div>Most people are not doing this.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">If we keep the separation (sub-mods), is it possible to move files<br class="">between sub-modules?<br class=""></div></div></blockquote><div><br class=""></div><div>Yes, but not with a single commit, it is “deleting code / file in repo X”, and then “adding code / file in repo Y”.</div><div>So the git log in repo Y stops at some point, where the commit message says “moving feature F from repo X”.</div><div>And then you need to close repo X, and use "git log” to find when it was taken out, and resume your blame from here.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">If we do mono-repo, then the problem goes away.<br class=""><br class=""><br class=""><blockquote type="cite" class="">Another thing I use daily is finding “when was this added”, using git<br class="">“pickaxe” (git log S ….). Which again works only inside a repository.<br class=""></blockquote><br class="">Uh, that looks nice. Can you share your alias? :)<br class=""></div></div></blockquote></div><br class=""><div class="">No alias, standard git:  git log -S “something”</div><div class=""><br class=""></div><div class="">One description I found online (<a href="http://jfire.io/blog/2012/03/07/code-archaeology-with-git/" class="">http://jfire.io/blog/2012/03/07/code-archaeology-with-git/</a> ) is:</div><div class=""><br class=""></div><div class="">"Pickaxes are often useful for archaeological purposes, and git’s pickaxe is no exception. It refers to the -S option to git log. The -S option takes a string parameter and searches the commit history for commits that introduce or remove that string. That’s not quite the same thing as searching for commits whose diff contains the string—the change must actually add or delete that string, not simply include a line on which it appears.”</div><div class=""><br class=""></div><div class="">— </div><div class="">Mehdi</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>