suggestion for git rebase -i
The tempfile used by git rebase -i is called "todo". For those using something like emacsclient, this is a bit too generic for the name of a file in a pre-existing editor session. I realize this is a small nit, but how about renaming the file to "git-rebase-todo"?
+ seth
Signature · 3 lines
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center BioC: http://bioconductor.org/ Blog: http://userprimary.net/user/
Hi,
Quoted 4 lines · Seth Falcon
The tempfile used by git rebase -i is called "todo". For those using something like emacsclient, this is a bit too generic for the name of a file in a pre-existing editor session. I realize this is a small nit, but how about renaming the file to "git-rebase-todo"?
Why? This is an implementation detail, and should not concern the user.
However, I was thinking about adding a "git rebase --status" to show where you are, but that will have to be implemented by someone else, or it has to wait a little.
Ciao,
Dscho
Quoted 4 lines · Johannes Schindelin
Quoted 2 lines
a file in a pre-existing editor session. I realize this is a small nit, but how about renaming the file to "git-rebase-todo"?
Why? This is an implementation detail, and should not concern the user.
Because if you want to setup macros or syntax highlighting specific to editing git-rebase tempfiles, then you have to figure out somehow that you are editing one. Using a more informative name for the tempfile means that you can guess based on the filename.
-Peff
Quoted 9 lines · Jeff King
Quoted 4 lines
Quoted 2 lines
a file in a pre-existing editor session. I realize this is a small nit, but how about renaming the file to "git-rebase-todo"?
Why? This is an implementation detail, and should not concern the user.
Because if you want to setup macros or syntax highlighting specific to editing git-rebase tempfiles, then you have to figure out somehow that you are editing one. Using a more informative name for the tempfile means that you can guess based on the filename.
Re-reading his original message, I actually don't think this is what he wanted it for. But I think it's reasonable to give the tempfile a meaningful name anyway for this reason.
-Peff
Quoted 2 lines · Johannes Schindelin
Why? This is an implementation detail, and should not concern the user.
In the context of an existing editing session, the name of the tempfile is visible and relevant to the user (not just an implementation detail). For example, the tempfile name is useful when multi-tasking and one needs to get back to the buffer. As another reply pointed out, the name could also be used for editor mode customization.
So. When editing a commit message, the buffer is named COMMIT_EDITMSG. When editing a rebase -i buffer it is named todo. Is this a real problem? Of course not. But I think a slightly more descriptive name makes sense -- especially if other commands gain interactive modes and a user might have a number of them going at once (in different repos, e.g.).
+ seth
Hi,
Quoted 9 lines · Seth Falcon
Quoted 2 lines · Johannes Schindelin
Why? This is an implementation detail, and should not concern the user.
In the context of an existing editing session, the name of the tempfile is visible and relevant to the user (not just an implementation detail). For example, the tempfile name is useful when multi-tasking and one needs to get back to the buffer. As another reply pointed out, the name could also be used for editor mode customization.
Okay, fair enough. But since you want that feature, you get to do the patch. Hint: it is just one line that has to be changed.
Ciao,
Dscho
Quoted 2 lines · Johannes Schindelin
Okay, fair enough. But since you want that feature, you get to do the patch. Hint: it is just one line that has to be changed.
Heh, I actually wrote the patch first, but thought it was so trivial... :-)
ok, I will send the patch and hopefully not screw up the formatting, etc. Feedback and hints welcome.
+ seth