> From: Roman Neuhauser <[email protected]> > > i'm writing an alternative to git-requet-pull. its output includes > a log of the commit range, eg: > > 1/3 76a23b86 043603cc README fancier > 162441d0 README > 2/3 87990615 ab984c9b ignore vim swapfiles > 32682119 .gitignore > 3/3 2c842d2d 2ab371a4 README is now README.txt > > each commit is represented by a line giving its position in the range, > the treeid, the commitid and the subject line, followed by a series of > lines identifying affected files, each line with the objectid and path. > > i'm gathering the data with `git-rev-list --objects`, but it doesn't > mention objects that were moved (git mv) in a given commit; this is > visible in the last (3/3) commit in the example above: that commit was > just `git mv README README.txt`. > > i want the output to identify moves and copies. what are my options? > am i missing an option in git-rev-list(1)? should i use a different > piece of plumbing?
The fundamental problem is that Git's data structures don't list moves and copies. For that matter, they don't list adds and deletes, either. As stored, each commit just tells the contents of the directory tree. What you appear to want is something that compares one or more commits and tells what the differences between them are. OTOH, is that what you *really* want? You say that you're "writing an alternative to git-request-pull". What is the definition of this output? What purposes do you expect the output to be put to? For instance, when you're pulling commit 3/3 from the remote, you don't *need* to download the blob that is the current contents of README.txt (and the former contents of README) because you already have it in your repository. So "git-rev-list --objects" doesn't list it. Dale -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
