git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Cc: "SZEDER Gábor" <szeder@ira.uka.de>
Subject: [PATCH] completion: remove ancient "ensure colon in COMP_WORDBREAKS" workaround
Date: Mon, 10 Jun 2013 01:59:21 +0200	[thread overview]
Message-ID: <1370822361-15637-1-git-send-email-szeder@ira.uka.de> (raw)

Fedore 9 shipped the gvfs package with a buggy Bash completion script:
it removed the ':' character from COMP_WORDBREAKS, thereby breaking
certain features of git's completion script.  We worked this around in
db8a9ff0 (bash completion: Resolve git show ref:path<tab> losing ref:
portion, 2008-07-15).

The bug was fixed in Fedora 10 and Fedora 9 reached its EOL on
2009-07-10, almost four years ago.  It's about time to remove our
workaround.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 contrib/completion/git-completion.bash | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 91234d47..2f78dcfa 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -24,11 +24,6 @@
 #    3) Consider changing your PS1 to also show the current branch,
 #       see git-prompt.sh for details.
 
-case "$COMP_WORDBREAKS" in
-*:*) : great ;;
-*)   COMP_WORDBREAKS="$COMP_WORDBREAKS:"
-esac
-
 # __gitdir accepts 0 or 1 arguments (i.e., location)
 # returns location of .git repo
 __gitdir ()
@@ -458,11 +453,6 @@ __git_complete_revlist_file ()
 			;;
 		esac
 
-		case "$COMP_WORDBREAKS" in
-		*:*) : great ;;
-		*)   pfx="$ref:$pfx" ;;
-		esac
-
 		__gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" 2>/dev/null \
 				| sed '/^100... blob /{
 				           s,^.*	,,
@@ -560,10 +550,6 @@ __git_complete_remote_or_refspec ()
 	[ "$remote" = "." ] && remote=
 	case "$cur_" in
 	*:*)
-		case "$COMP_WORDBREAKS" in
-		*:*) : great ;;
-		*)   pfx="${cur_%%:*}:" ;;
-		esac
 		cur_="${cur_#*:}"
 		lhs=0
 		;;
-- 
1.8.0.269.g97125f4

             reply	other threads:[~2013-06-09 23:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09 23:59 SZEDER Gábor [this message]
2013-06-10  0:09 ` [PATCH] completion: remove ancient "ensure colon in COMP_WORDBREAKS" workaround Jonathan Nieder
2013-06-10  9:14   ` SZEDER Gábor
2013-06-10 20:48     ` Junio C Hamano
2013-06-10  1:58 ` Eric Sunshine

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=1370822361-15637-1-git-send-email-szeder@ira.uka.de \
    --to=szeder@ira.uka.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 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).