zsh-users
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: Jordan Klassen <jordan@klassen.me.uk>, zsh-users@zsh.org
Subject: Re: git-subtree completions
Date: Thu, 07 Jul 2016 02:00:10 +0000	[thread overview]
Message-ID: <20160707020010.GA25225@tarsus.local2> (raw)
In-Reply-To: <27621.1463140958__28965.9567446963$1463141465$gmane$org@thecus.kiddle.eu>

I see this has been committed now; reviewing the committed patch:

> +++ b/Completion/Unix/Command/_git
> @@ -1747,6 +1747,91 @@ 
> +(( $+functions[_git-subtree] )) ||
> +_git-subtree () {
> +    (option-or-argument)
> +      curcontext=${curcontext%:*}-$line[1]:
> +      case $line[1] in
> +        (add)
> +          _arguments \
> +            '(-q --quiet)'{-q,--quiet}'[suppress progress output]' \
> +            '(-m --message)'{-m,--message}'[use the given message as the commit message for the merge commit]' \

-m takes an argument, but this spec doesn't reflect that.  I assume it should be

               '(-m --message)'{-m+,--message=}'[use the given message as the commit message for the merge commit]:message' \
	                        ^^^ ^^^^^^^^^^                                                                    ^^^^^^^^
(three changes)

> +            '(-P --prefix)'{-P,--prefix=}'[the path to the subtree in the repository to manipulate]: :_directories' \

s/-P,/-P+,/

> +            '--squash[import only a single commit from the subproject]' \
> +            ': :__git_any_repositories_or_references' \
> +            ':: :__git_ref_specs' && ret=0

__git_ref_specs doesn't seem appropriate here:
.
    % git subtree add -P foo ../other-repository/ master:target
    'master:target' does not look like a ref
.
I think what is wanted here is "names of refs in the remote repository",
same as the before-the-colon part of 'git fetch' refspecs.

(And by the way, __git_ref_specs is deprecated in master; new code
should use one of the two __git_ref_specs_* functions directly.)

Cheers,

Daniel


  parent reply	other threads:[~2016-07-07  2:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12  5:57 Jordan Klassen
2016-05-13  9:39 ` Bart Schaefer
2016-05-13 12:02 ` Oliver Kiddle
     [not found] ` <27621.1463140958__28965.9567446963$1463141465$gmane$org@thecus.kiddle.eu>
2016-07-07  2:00   ` Daniel Shahaf [this message]
2016-07-13  4:24     ` Daniel Shahaf

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=20160707020010.GA25225@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=jordan@klassen.me.uk \
    --cc=okiddle@yahoo.co.uk \
    --cc=zsh-users@zsh.org \
    /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.
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).