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

Re: [PATCH] gitignore: add top level patch ignore rule

From
Vitaliy Ivanov <vitalivanov@gmail.com>
Date
Jul 21, 2011, 12:54 UTC
Message-ID
<CAGTPOqeF6LneWCg_du5dDfzFp7QV_jGg1t4u23sziTN+uHQyXA@mail.gmail.com>
In-Reply-To
<4E268D2F.50201@drmicha.warpmail.net>
Michael,

On Wed, Jul 20, 2011 at 11:09 AM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 21 quoted lines
> Vitaliy Ivanov venit, vidit, dixit 20.07.2011 00:17:
>> Add top level ignore rule for patches created by format-patch command.
>
> Please don't.
>
> The tracked ignore file is for ignoring products and artefacts of our
> build process. format-patch is not part of this process, and the
> existence of *.patch files depends on your workflow. But what is much
> worse: In
>
> git status
> git format-patch rev-spec
> git send-email *.patch
>
> it is very easy to send out the wrong patches (along with the right
> ones), because your patch hides them from status. Also, I can't clean
> them up with "git clean -f" any more. I would have to use "git clean -f
> -x" which would clean the build products also (and force a rebuild).
>
> So, your patch makes a format-patch based workflow much worse. What
> problem does it try to solve?

I will not insist. You may know it better but git as is a public project where anyone can create and send patches. So it seems to me basic workflow for sharing changes.

>
>> On the way, reorganize ignore rules and add comments.
>
> How and why do you reorganize?

Just to be able to find specific rule faster. Global rules are now all together same is for top level root rules.

Show 82 quoted lines
>
>>
>> Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
>> ---
>>  .gitignore |   43 ++++++++++++++++++++++++++++++-------------
>>  1 files changed, 30 insertions(+), 13 deletions(-)
>>
>> diff --git a/.gitignore b/.gitignore
>> index 8572c8c..47afe77 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -1,3 +1,15 @@
>> +#
>> +# NOTE! Don't add files that are generated in specific
>> +# subdirectories here. Add them in the ".gitignore" file
>> +# in that subdirectory instead.
>> +#
>> +# NOTE! Please use 'git ls-files -i --exclude-standard'
>> +# command after changing this file, to see if there are
>> +# any tracked files which get ignored after the change.
>> +
>> +#
>> +# Top-level files
>> +#
>>  /GIT-BUILD-OPTIONS
>>  /GIT-CFLAGS
>>  /GIT-LDFLAGS
>> @@ -187,21 +199,10 @@
>>  /test-svn-fe
>>  /test-treap
>>  /common-cmds.h
>> -*.tar.gz
>> -*.dsc
>> -*.deb
>>  /git.spec
>> -*.exe
>> -*.[aos]
>> -*.py[co]
>> -.depend/
>> -*.gcda
>> -*.gcno
>> -*.gcov
>>  /coverage-untested-functions
>>  /cover_db/
>>  /cover_db_html/
>> -*+
>>  /config.mak
>>  /autom4te.cache
>>  /config.cache
>> @@ -213,6 +214,24 @@
>>  /tags
>>  /TAGS
>>  /cscope*
>> +/Debug/
>> +/Release/
>> +/*.patch
>> +
>> +#
>> +# Normal rules
>> +#
>> +*.tar.gz
>> +*.dsc
>> +*.deb
>> +*.exe
>> +*.[aos]
>> +*.py[co]
>> +.depend/
>> +*.gcda
>> +*.gcno
>> +*.gcov
>> +*+
>>  *.obj
>>  *.lib
>>  *.sln
>> @@ -222,5 +241,3 @@
>>  *.user
>>  *.idb
>>  *.pdb
>> -/Debug/
>> -/Release/
>
>
Previous: Michael J GruberNext: Michael J Gruber
Message 3 of 8 in “gitignore: add top level patch ignore rule”
  1. gitignore: add top level patch ignore ruleVitaliy Ivanov, Jul 19, 2011
  2. Michael J GruberJul 20, 2011
  3. Vitaliy IvanovJul 21, 2011
  4. Michael J GruberJul 21, 2011
  5. Vitaliy IvanovJul 21, 2011
  6. Michael J GruberJul 21, 2011
  7. Marc BranchaudJul 21, 2011
  8. Vitaliy IvanovJul 22, 2011

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.