All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Thomas Rast <trast@student.ethz.ch>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
	"Santi Béjar" <santi@agolina.net>
Subject: Re: [PATCH v2 2/2] bash completion: only show 'log --merge' if merging
Date: Wed, 18 Feb 2009 09:05:18 -0800	[thread overview]
Message-ID: <20090218170518.GD22848@spearce.org> (raw)
In-Reply-To: <bc66ec312ad33c4a7c9580ba4ade75c5998443d7.1234801852.git.trast@student.ethz.ch>

Thomas Rast <trast@student.ethz.ch> wrote:
> The gitk completion only shows --merge if MERGE_HEAD is present.
> Do it the same way for git-log completion.
> 
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> ---
>  contrib/completion/git-completion.bash |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)

Both patches,

Acked-by: Shawn O. Pearce <spearce@spearce.org>
 
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index a5b3bf3..489951b 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1003,6 +1003,11 @@ _git_log ()
>  	__git_has_doubledash && return
>  
>  	local cur="${COMP_WORDS[COMP_CWORD]}"
> +	local g="$(git rev-parse --git-dir 2>/dev/null)"
> +	local merge=""
> +	if [ -f $g/MERGE_HEAD ]; then
> +		merge="--merge"
> +	fi
>  	case "$cur" in
>  	--pretty=*)
>  		__gitcomp "$__git_log_pretty_formats
> @@ -1030,7 +1035,7 @@ _git_log ()
>  			--decorate
>  			--walk-reflogs
>  			--parents --children
> -			--merge
> +			$merge
>  			$__git_diff_common_options
>  			--pickaxe-all --pickaxe-regex
>  			"
> -- 
> 1.6.2.rc0.328.g2c702
> 

-- 
Shawn.

  reply	other threads:[~2009-02-18 17:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-14 19:54 [PATCH] bash completion: offer more options for gitk Thomas Rast
2009-02-15  9:33 ` Junio C Hamano
2009-02-15  9:56   ` Santi Béjar
2009-02-16 16:34     ` [PATCH v2 0/2] bash completion: more options for gitk/log/shortlog Thomas Rast
2009-02-16 16:38       ` Thomas Rast
2009-02-16 19:00       ` [RFC PATCH] format-patch: thread as reply to cover letter even with in-reply-to Thomas Rast
2009-02-16 20:22         ` Jay Soffian
2009-02-16 20:34           ` Thomas Rast
2009-02-16 20:52             ` Jakub Narebski
2009-02-16 23:27               ` Thomas Rast
2009-02-19 21:26                 ` [PATCH 0/4] format-patch --cover-letter --in-reply-to Thomas Rast
2009-02-19 21:26                   ` [PATCH 1/4] format-patch: threading test reactivation Thomas Rast
2009-02-19 21:26                   ` [PATCH 2/4] format-patch: track several references Thomas Rast
2009-02-19 22:41                     ` Daniel Barkalow
2009-02-20 19:55                       ` [PATCH v2 next 0/4] format-patch --cover-letter --in-reply-to Thomas Rast
2009-02-20 19:55                         ` [PATCH v2 next 1/4] format-patch: threading test reactivation Thomas Rast
2009-02-20 19:55                         ` [PATCH v2 next 2/4] format-patch: track several references Thomas Rast
2009-02-20 19:55                         ` [PATCH v2 next 3/4] format-patch: thread as reply to cover letter even with in-reply-to Thomas Rast
2009-02-20 19:55                         ` [PATCH v2 next 4/4] format-patch: support deep threading Thomas Rast
2009-02-22 16:49                         ` [PATCH v2 next 0/4] format-patch --cover-letter --in-reply-to Junio C Hamano
2009-02-19 21:26                   ` [PATCH 3/4] format-patch: thread as reply to cover letter even with in-reply-to Thomas Rast
2009-02-19 21:26                   ` [PATCH 4/4] format-patch: support deep threading Thomas Rast
2009-02-16 16:34     ` [PATCH v2 1/2] bash completion: refactor common log, shortlog and gitk options Thomas Rast
2009-02-16 16:34     ` [PATCH v2 2/2] bash completion: only show 'log --merge' if merging Thomas Rast
2009-02-18 17:05       ` Shawn O. Pearce [this message]
2009-02-18 19:02         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090218170518.GD22848@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=santi@agolina.net \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.