All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: vitalivanov@gmail.com
Cc: Junio C Hamano <gitster@pobox.com>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH] gitignore: add top level patch ignore rule
Date: Wed, 20 Jul 2011 10:09:19 +0200	[thread overview]
Message-ID: <4E268D2F.50201@drmicha.warpmail.net> (raw)
In-Reply-To: <1311113877.2643.2.camel@vitaliy-Vostro-1400>

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?

> On the way, reorganize ignore rules and add comments.

How and why do you reorganize?

> 
> 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/

  reply	other threads:[~2011-07-20  8:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 22:17 [PATCH] gitignore: add top level patch ignore rule Vitaliy Ivanov
2011-07-20  8:09 ` Michael J Gruber [this message]
2011-07-21 12:54   ` Vitaliy Ivanov
2011-07-21 13:02     ` Michael J Gruber
2011-07-21 13:22       ` Vitaliy Ivanov
2011-07-21 13:29         ` Michael J Gruber
2011-07-21 14:50         ` Marc Branchaud
2011-07-22 13:20           ` Vitaliy Ivanov

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=4E268D2F.50201@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=vitalivanov@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.