zsh-workers
 help / color / mirror / code / Atom feed
From: "Nikolai Weibull" <now@bitwi.se>
To: "Mikael Magnusson" <mikachu@gmail.com>
Cc: zsh-workers <zsh-workers@sunsite.dk>, "Clint Adams" <clint@zsh.org>
Subject: Re: Make git-commit complete both modified files and git-added files.
Date: Thu, 4 Oct 2007 10:05:49 +0200	[thread overview]
Message-ID: <dbfc82860710040105o8d07bd3h784fa550f3b571ab@mail.gmail.com> (raw)
In-Reply-To: <237967ef0710031805r1124449dmc4c55e7545a81e0a@mail.gmail.com>

On 10/4/07, Mikael Magnusson <mikachu@gmail.com> wrote:

> +#this is for git-commit which can take files both git-added and not
> +(( $+functions[__git_changed_files] )) ||
> +__git_changed_files () {
> +  gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
> +  __git_command_successful || return

What do you need gitdir for?

> +
> +  files=(${(ps:\0:)"$(_call_program files git diff-index -z
> --name-only HEAD 2>/dev/null)"})
> +  __git_command_successful || return
> +
> +  _wanted files expl 'index file' _multi_parts $@ - / files
> +}
> +
>  (( $+functions[__git_tree_files] )) ||
>  __git_tree_files () {
>    local multi_parts_opts


  reply	other threads:[~2007-10-04  8:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-04  1:05 Mikael Magnusson
2007-10-04  8:05 ` Nikolai Weibull [this message]
2007-10-04  8:27   ` Clint Adams

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=dbfc82860710040105o8d07bd3h784fa550f3b571ab@mail.gmail.com \
    --to=now@bitwi.se \
    --cc=clint@zsh.org \
    --cc=mikachu@gmail.com \
    --cc=zsh-workers@sunsite.dk \
    /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).