# [PATCH] Documentation: fix a typo in git-apply.txt

5 messages from 2011-03-03 to 2011-03-04. Participants: Michał Kiedrowicz, Junio C Hamano, Michal Kiedrowicz, Eric Raible.
Thread: https://gitlist.dev/t/26643

## Michał Kiedrowicz, 2011-03-03 09:28

Subject: [PATCH] Documentation: fix a typo in git-apply.txt
Message-ID: <1299144510-8143-1-git-send-email-michal.kiedrowicz@gmail.com>
URL: https://gitlist.dev/e/1299144510-8143-1-git-send-email-michal.kiedrowicz%40gmail.com

```
git-apply accepts the --cached option, not --cache.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
---
 Documentation/git-apply.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git Documentation/git-apply.txt Documentation/git-apply.txt
index 881652f..2dcfc09 100644
--- Documentation/git-apply.txt
+++ Documentation/git-apply.txt
@@ -22,7 +22,7 @@ DESCRIPTION
 -----------
 Reads the supplied diff output (i.e. "a patch") and applies it to files.
 With the `--index` option the patch is also applied to the index, and
-with the `--cache` option the patch is only applied to the index.
+with the `--cached` option the patch is only applied to the index.
 Without these options, the command applies the patch only to files,
 and does not require them to be in a git repository.
 
-- 
1.7.4.1

```

## Junio C Hamano, 2011-03-03 23:28

Subject: Re: [PATCH] Documentation: fix a typo in git-apply.txt
Message-ID: <7vlj0v942a.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vlj0v942a.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1299144510-8143-1-git-send-email-michal.kiedrowicz@gmail.com>

```
Michał Kiedrowicz <michal.kiedrowicz@gmail.com> writes:

> git-apply accepts the --cached option, not --cache.
>
> Signed-off-by: Micha=C5=82 Kiedrowicz <michal.kiedrowicz@gmail.com>
> ---
>  Documentation/git-apply.txt |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git Documentation/git-apply.txt Documentation/git-apply.txt
> index 881652f..2dcfc09 100644
> --- Documentation/git-apply.txt
> +++ Documentation/git-apply.txt

What kind of crap is this?

We really should make it much harder for people to use funky src/dst
prefix when generating patches.

```

## Michal Kiedrowicz, 2011-03-04 07:56

Subject: Re: [PATCH] Documentation: fix a typo in git-apply.txt
Message-ID: <20110304085622.6faa0c93@mkiedrowicz>
URL: https://gitlist.dev/e/20110304085622.6faa0c93%40mkiedrowicz
In-Reply-To: <7vlj0v942a.fsf@alter.siamese.dyndns.org>

```
On 03.03.2011 15:28:45 -0800 Junio C Hamano <gitster@pobox.com> wrote:

> Michał Kiedrowicz <michal.kiedrowicz@gmail.com> writes:
> 
> > git-apply accepts the --cached option, not --cache.
> >
> > Signed-off-by: Micha=C5=82 Kiedrowicz <michal.kiedrowicz@gmail.com>
> > ---
> >  Documentation/git-apply.txt |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git Documentation/git-apply.txt Documentation/git-apply.txt
> > index 881652f..2dcfc09 100644
> > --- Documentation/git-apply.txt
> > +++ Documentation/git-apply.txt
> 
> What kind of crap is this?
> 
> We really should make it much harder for people to use funky src/dst
> prefix when generating patches.

It's called diff.noprefix=true :). I use it @work to easily copy/paste
paths from git-diff output. I guess I should somehow make git.git
config ignore global settings.

---
From: =?UTF-8?q?Micha=C5=82=20Kiedrowicz?= <michal.kiedrowicz@gmail.com>
Date: Thu, 3 Mar 2011 09:51:46 +0100
Subject: [PATCH] Documentation: fix a typo in git-apply.txt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

git-apply accepts the --cached option, not --cache.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
---
 Documentation/git-apply.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index 881652f..2dcfc09 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -22,7 +22,7 @@ DESCRIPTION
 -----------
 Reads the supplied diff output (i.e. "a patch") and applies it to files.
 With the `--index` option the patch is also applied to the index, and
-with the `--cache` option the patch is only applied to the index.
+with the `--cached` option the patch is only applied to the index.
 Without these options, the command applies the patch only to files,
 and does not require them to be in a git repository.

-- 
1.7.4.1

```

## Eric Raible, 2011-03-04 08:31

Subject: Re: Re: [PATCH] Documentation: fix a typo in git-apply.txt
Message-ID: <4D70A345.1010706@nextest.com>
URL: https://gitlist.dev/e/4D70A345.1010706%40nextest.com
In-Reply-To: <20110304085622.6faa0c93@mkiedrowicz>

```
On 11:59 AM, Michal Kiedrowicz wrote:
> On 03.03.2011 15:28:45 -0800 Junio C Hamano <gitster@pobox.com> wrote:
> 
>> Michał Kiedrowicz <michal.kiedrowicz@gmail.com> writes:
>>
>>> git-apply accepts the --cached option, not --cache.
>>>
>>> Signed-off-by: Micha=C5=82 Kiedrowicz <michal.kiedrowicz@gmail.com>
>>> ---
>>>  Documentation/git-apply.txt |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git Documentation/git-apply.txt Documentation/git-apply.txt
>>> index 881652f..2dcfc09 100644
>>> --- Documentation/git-apply.txt
>>> +++ Documentation/git-apply.txt
>>
>> What kind of crap is this?
>>
>> We really should make it much harder for people to use funky src/dst
>> prefix when generating patches.
> 
> It's called diff.noprefix=true :). I use it @work to easily copy/paste
> paths from git-diff output. I guess I should somehow make git.git
> config ignore global settings.

The local config will override the global settings automatically.

	git config diff.noprefix false

Should do it.

```

## Michal Kiedrowicz, 2011-03-04 10:43

Subject: Re: [PATCH] Documentation: fix a typo in git-apply.txt
Message-ID: <20110304114314.2bc9ce26@mkiedrowicz>
URL: https://gitlist.dev/e/20110304114314.2bc9ce26%40mkiedrowicz
In-Reply-To: <4D70A345.1010706@nextest.com>

```
On 04.03.2011 00:31:01 -0800 Eric Raible <raible@nextest.com> wrote:

> On 11:59 AM, Michal Kiedrowicz wrote:
> > On 03.03.2011 15:28:45 -0800 Junio C Hamano <gitster@pobox.com>
> > wrote:
> > 
> >> Michał Kiedrowicz <michal.kiedrowicz@gmail.com> writes:
> >>
> >>> git-apply accepts the --cached option, not --cache.
> >>>
> >>> Signed-off-by: Micha=C5=82 Kiedrowicz
> >>> <michal.kiedrowicz@gmail.com> ---
> >>>  Documentation/git-apply.txt |    2 +-
> >>>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>>
> >>> diff --git Documentation/git-apply.txt Documentation/git-apply.txt
> >>> index 881652f..2dcfc09 100644
> >>> --- Documentation/git-apply.txt
> >>> +++ Documentation/git-apply.txt
> >>
> >> What kind of crap is this?
> >>
> >> We really should make it much harder for people to use funky
> >> src/dst prefix when generating patches.
> > 
> > It's called diff.noprefix=true :). I use it @work to easily
> > copy/paste paths from git-diff output. I guess I should somehow
> > make git.git config ignore global settings.
> 
> The local config will override the global settings automatically.
> 
> 	git config diff.noprefix false
> 
> Should do it.
> 

Yeah, I know, that's what I did eventually. I meant something like

	git config core.ignoreGlobalConfig true

to protect from all changes set in ~/.gitconfig.

```
