git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add git format-patch produced patches to .gitignore

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 16, 2010, 13:06 UTC
Message-ID
<AANLkTilsZ1Dzsu6GwWaNh8WvMrzpQtj5AQNDavdYuCjf@mail.gmail.com>
In-Reply-To
<20100516075244.GA9010@progeny.tock>
On Sun, May 16, 2010 at 07:52, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 19 quoted lines
> Pavan Kumar Sunkara wrote:
>> Ævar Arnfjörð Bjarmason wrote:
>
>>> --- a/.gitignore
>>> +++ b/.gitignore
>>> @@ -203,3 +203,4 @@
>>>  *.pdb
>>>  /Debug/
>>>  /Release/
>>> +[0-9][0-9][0-9][0-9]-*.patch
> [...]
>> git format-patch -M origin/master -o outgoing/
>>
>> So, my patches will be in subdirectory outgoing.
>> But the regex rule in this patch won't be able to hide them.
>>
>> What do u want to do in that case ?
>
> Try it out.

Right, patches in outgoing/ will be ignored too because the rule isn't prefixed with /, so it works regardless of whether the file is in a subdirectory or not.

> In fact, I was worried that this patch would trigger a similar
> problem: maybe some test data directory contains format-patch
> output?  In fact none do, so I like the patch.

None do, there's no file that matches '????-*.patch' in Git. Even if there was you could still 'git add -f' it, which wouldn't be that big of a problem because it would be part of some rarely touched test suite in t/*.

Previous: Jonathan NiederNext: Michael J Gruber
Message 4 of 9 in “Add git format-patch produced patches to .gitignore”
  1. Add git format-patch produced patches to .gitignoreÆvar Arnfjörð Bjarmason, May 15, 2010
  2. Pavan Kumar SunkaraMay 16, 2010
  3. Jonathan NiederMay 16, 2010
  4. Ævar Arnfjörð BjarmasonMay 16, 2010
  5. Michael J GruberMay 16, 2010
  6. Jonathan NiederMay 17, 2010
  7. Remove editor-specific droppings from .gitignoreÆvar Arnfjörð Bjarmason, May 17, 2010
  8. Jonathan NiederMay 17, 2010
  9. Michael J GruberMay 17, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.