On Sat, 12 Jan 2008, Jon Smirl wrote: > > I have a file that a vendor has modified. It's a serial driver so I > know which directory the original file came from. Is there a way to > ask git to search through all of the past versions of all of the files > in this directory and give me the top two or three choices as to what > file the vendor originally copied before staring to edit? This is the > same problem as picking the best diff base. Heh. Maybe you could just use the rename logic? Example of what *might* work: - go to the directory in the git tree you think the file came from - delete all the files that are *potential* sources (eg "rm *.c") - add the new file to that directory - commit the end result - ask git to find the best rename possibility, using a low rename detection score, something like: git show -M1% (and no, I don't guarantee that that "-M1%" is the right syntax, and in general you might well want to play with this concept a bit..) No guarantees, but it just might work.. Linus - 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