Add ability to use arbitrary log formats#88
Conversation
:Agit can only display the entire history because it uses option '--all' in its log command. This is fine for small projects with one or two branches. But with larger projects like Linux, there are many branches that are far apart from each other. This behaviour makes it impossible to easily view logs of the branch you want because it might not even be close to the tip of the repo and so it will be buried deep inside the log. In addition, you can't use more advanced log options like -L, --author, etc. So, add a new version of the :Agit command called :Agit!. This lets the user pass arbitrary options to the log command that will be executed. The most important difference is that this version will not use '--all' when calling git log. While here, add some whitespace in agit#launch() to make reading it a bit easier.
|
|
| endfunction | ||
|
|
||
| function! agit#launch(args) | ||
| function! agit#launch(bang, args) |
There was a problem hiding this comment.
It is not necessary to modify agit#launch. This method does not care about any concrete VIEW logic.
There was a problem hiding this comment.
Ok. It won't be needed if we go with another command name.
| @@ -41,7 +43,15 @@ endfunction | |||
|
|
|||
| function! s:git.log(winwidth) dict | |||
There was a problem hiding this comment.
It should be a new function instead to modify s:git.log.
Ok. What name would you suggest? I'm not great at naming things, and I can't think of anything sensible. |
|
How aboud |
|
Hmm, it is a mouthful. I don't think it will be all that easy to type or remember. And I also don't think it represents what the command does very well. We can pass much more than just formatting options to git-log. Thinking about it a bit more, I am inclined towards |
Add a new version of the :Agit command called :Agit! that takes arbitrary git-log arguments. This lets people use various options in git-log like -L, --authot, pathspecs, etc.
The implementation is a bit hacky but works for me.