zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] git log --dirstat=20 --shortstat completion
@ 2011-08-17  9:32 Martin Luder
  2011-08-17 10:50 ` Nikolai Weibull
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Luder @ 2011-08-17  9:32 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

Hi

I changed git log completion so it still completes branch names when
--dirstat=20 --shortstat options are present.

I have to admit that I don’t really know what I am doing, I copied the
two lines from the git diff options function. Completion works now, though.

Martin

[-- Attachment #2: git_log.patch --]
[-- Type: application/octet-stream, Size: 681 bytes --]

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index fb04506..82858ab 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5589,6 +5589,8 @@ __git_setup_log_options () {
     '(- *)-h[display help]'
     '(           --no-decorate)--decorate=-[print out ref names of any commits that are shown]: :__git_log_decorate_formats'
     '(--decorate              )--no-decorate[do not print out ref names of any commits that are shown]'
+    '--shortstat[generate summary diffstat]'
+    '--dirstat=-[generate dirstat by amount of changes]: :__git_guard_number limit'
     '--source[show which ref each commit is reached from]')
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] git log --dirstat=20 --shortstat completion
  2011-08-17  9:32 [PATCH] git log --dirstat=20 --shortstat completion Martin Luder
@ 2011-08-17 10:50 ` Nikolai Weibull
  0 siblings, 0 replies; 2+ messages in thread
From: Nikolai Weibull @ 2011-08-17 10:50 UTC (permalink / raw)
  To: Martin Luder; +Cc: zsh-workers

On Wed, Aug 17, 2011 at 11:32, Martin Luder <maser@winterfell.ch> wrote:
> Hi
>
> I changed git log completion so it still completes branch names when
> --dirstat=20 --shortstat options are present.
>
> I have to admit that I don’t really know what I am doing, I copied the
> two lines from the git diff options function. Completion works now, though.

It seems that git log should take git diff options.  Adding a call to
__git_setup_diff_options should do the trick.

This has been applied to CVS.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-17 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-17  9:32 [PATCH] git log --dirstat=20 --shortstat completion Martin Luder
2011-08-17 10:50 ` Nikolai Weibull

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).