Ron Garret <ron1@xxxxxxxxxxx> wrote: > I'm trying to write a little utility that will extract all the revisions > of a particular file. I start with a git rev-list HEAD -- filename, get > the tree objects with git cat-file commit, the file objects with git > ls-tree, and finally the file contents themselves with git cat-file > blob. It works, except in the case where the file name was changed. > git rev-list is smart enough to track those name changes, but my little > revision tracker isn't. It dies when suddenly there is no file with the > right name in the tree. > > So... is there an easy way to work around this? Is there a way to get, > say, rev-list to tell me when the file it is tracking changed names? Or > a git-diff incantation? I just need something that will tell me given > two commits and a file name whether the file was renamed between those > two commits and if so what its new name is. There must be an easy way > to do this, but I can't figure out what it is. Maybe use the -M flag to git log, or the --follow flag to log/rev-list? -- Shawn. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html