Re: [AMBER-Developers] logs of manuals

From: Jason Swails <jason.swails.gmail.com>
Date: Fri, 21 Nov 2014 15:48:53 -0500

> On Nov 21, 2014, at 3:33 PM, Scott Brozell <sbrozell.rci.rutgers.edu> wrote:
>
> Hi,
>
> How does one access the logs for old manuals ?
>
> Why does this fail ??:
>
> % git log --follow -C AmberTools12.lyx
> fatal: ambiguous argument 'AmberTools12.lyx': unknown revision or path not in the working tree.
> Use '--' to separate paths from revisions
>
> (and so do Amber12.lyx, Amber11.lyx, AmberTools.lyx).

I’ve hit the same brick wall you have before, but I stumbled upon a hilariously simple way of getting around it (one of the first things I tried): create an empty file with the same name and try again:

[swails.Robin ~/amber/doc (master) ]$ git log Amber11.lyx | head
fatal: ambiguous argument 'Amber11.lyx': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
[swails.Robin ~/amber/doc (master) ]$ touch Amber11.lyx
[swails.Robin ~/amber/doc (master) ]$ git log Amber11.lyx | head
commit 8c5b3e5a6520c6f5e74255674ffac5bdb5cfef9c
Author: David A. Case <case.biomaps.rutgers.edu>
Date: Sun Jan 15 14:19:13 2012 -0500

    start of Amber11 -> Amber12 manual conversion

commit 43b20f2028203317d7cede24784a40cf98a98cc6
Author: xiongwu <wuxw.nhlbi.nih.gov>
Date: Mon Jan 9 09:40:01 2012 -0500

That is *much* easier than checking out an old revision and hunting through changes that way :).

> And why does this not contain the old logs ??:
>
> % git log --follow -C Amber.lyx
> ...
> commit 279067763e6079342827b84012c8c46351fbb405
> Author: David A. Case <case.biomaps.rutgers.edu>
> Date: Wed Jan 8 15:29:28 2014 -0500
>
> update naming of the manual .lyx and .pdf files

It wasn’t a simple rename. Dave didn’t simply rename Amber12.lyx to Amber.lyx -- he combined Amber12.lyx with AmberTools12.lyx and cut and pasted stuff around. It is a completely new manual that can’t be detected as a simple rename, ergo --follow won’t do anything.

^^^^ Disclaimer: I think the above is true. I’m not exactly sure the way in which git tracks file names and content (but I _do_ know it does so differently such that you can trace the history of a line back through files). I think I do have a reasonably accurate understanding of git, though, so I think the above is correct. You may be able to do a “git blame” on the Amber.lyx file and see commits in which a specific line was changed back in AmberToolsXX.lyx, but it only ever looks at the last commit that changed the content of that line (not an exhaustive history by any stretch of the imagination).

I hope this helps,
Jason

--
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Nov 21 2014 - 13:00:03 PST
Custom Search