Michael, I didn't respond right away because I wanted to think it over.
On 25/12/08 10:20AM, Michael Albinus wrote: > Side remark: I've stolen the format from ClearCase. In ClearCase, > directories are also revisioned objects. So you could use a file name > like "~/src/git-tramp@@/<rev1>/git-tramp.el/<rev2>". Git doesn't support > revisioned directories, one would need to simulate them. Nothing I would > implement now. Your arguments are correct: * Path to repo should be first An irresolvable problem was that the implementation via Tramp didn't play well with the autocompletion. In my case, I'm using 'ido', typing '~' in anywhere in the path would delete the entire input mini-buffer, I couldn't make this work with the intent of being path to a repo directory. Your suggestion of using magic filenames is a good idea because it should integrate better with the existing infrastructure. * I've used ClearCase for a long period during my career, I like your specific suggestion above. I imagine that one 'rev' the path should be sufficient, it could be a hash or a tag or a branch name. The complete format will be: ~/path/to/repo@@rev/path/to/file/or/dir And it will open a dired or file (in r/o mode) * I thought about speed of autocompletion of 'rev', the autocompletion of hashes has to happen at a low-level implementation. Instead of obtaining all hashes via 'git log', go straight to the folder '.git/objects'. Notice that the hashes are broken in a two-level directory tree. This is what gives the speed of git itself to de-reference quickly object by their hashes. Doing autocompletion based on this directory structure should be fast. Nonetheless, it might turn out that autocompletion of hashes doesn't make sense, most likely users will copy & paste that part (when not using tags/branches/etc.) I will most likely borrow some ideas (with appropriate attribution) from your implementations, I see that you have worked on some corner cases which I hadn't implemented in my first/early implementation. Best regards, Peter M. https://hangar118.sdf.org
