git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mehul Jain <mehul.jain2029@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Duy Nguyen <pclouds@gmail.com>,
	Stefan Beller <sbeller@google.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: git-apply does not work in a sub-directory of a Git repository
Date: Wed, 23 Mar 2016 22:54:19 +0530	[thread overview]
Message-ID: <CA+DCAeSE4CS8zg1tHP5kYOs-CbGk0uAzWX9Zh9Fk3O7mYwYTMQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqbn65dxtl.fsf@gitster.mtv.corp.google.com>

On Wed, Mar 23, 2016 at 8:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
> I think we do have --no-index (which is why I am largely ignoring
> the rest of your message as uninformed speculation for now).

--no-index command line flag is there for git-apply but unfortunately not
documented.

Also *auto-completion* for "git apply --no-index" doesn't work.

That is

    git apply --no-i<tab><tab>

should be auto completed and give

   git apply --no-index.

Probably following change will remove this problem.

diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 45ec47f..860dae0 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -886,7 +886,7 @@ _git_apply ()
                ;;
        --*)
                __gitcomp "
-                       --stat --numstat --summary --check --index
+                       --stat --numstat --summary --check --index --no-index
                        --cached --index-info --reverse --reject --unidiff-zero
                        --apply --no-add --exclude=
                        --ignore-whitespace --ignore-space-change

      parent reply	other threads:[~2016-03-23 17:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 12:10 git-apply does not work in a sub-directory of a Git repository Mehul Jain
2016-03-22 22:14 ` Stefan Beller
2016-03-23 10:15   ` Duy Nguyen
2016-03-23 15:21     ` Junio C Hamano
2016-03-23 16:55       ` Junio C Hamano
2016-03-24 10:49         ` Duy Nguyen
2016-03-24 11:56           ` Nguyễn Thái Ngọc Duy
2016-03-24 11:56             ` [PATCH 1/4] git-apply.txt: remove a space Nguyễn Thái Ngọc Duy
2016-03-24 11:56             ` [PATCH 2/4] git-apply.txt: mention the behavior inside a subdir Nguyễn Thái Ngọc Duy
2016-03-24 11:56             ` [PATCH 3/4] apply: add --whole to apply git patch without prefix filtering Nguyễn Thái Ngọc Duy
2016-03-24 11:56             ` [PATCH 4/4] apply: report patch skipping in verbose mode Nguyễn Thái Ngọc Duy
2016-03-24 16:50             ` git-apply does not work in a sub-directory of a Git repository Junio C Hamano
2016-03-24 17:32               ` Junio C Hamano
2016-03-30  1:05               ` Duy Nguyen
2016-03-30 17:13                 ` Junio C Hamano
2016-03-30  9:33               ` Duy Nguyen
2016-03-24 16:29           ` Junio C Hamano
2016-03-23 17:24       ` Mehul Jain [this message]

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=CA+DCAeSE4CS8zg1tHP5kYOs-CbGk0uAzWX9Zh9Fk3O7mYwYTMQ@mail.gmail.com \
    --to=mehul.jain2029@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=sbeller@google.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).