git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Branchaud <marcnarc@xiplink.com>
To: Vitaliy Ivanov <vitalivanov@gmail.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
	Junio C Hamano <gitster@pobox.com>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH] gitignore: add top level patch ignore rule
Date: Thu, 21 Jul 2011 10:50:06 -0400	[thread overview]
Message-ID: <4E283C9E.2050000@xiplink.com> (raw)
In-Reply-To: <CAGTPOqcd5G=NG83wgnH80nqNsS1FYwtRp4QjaB=oU5NkPts_Hg@mail.gmail.com>

On 11-07-21 09:22 AM, Vitaliy Ivanov wrote:
> On Thu, Jul 21, 2011 at 4:02 PM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> Vitaliy Ivanov venit, vidit, dixit 21.07.2011 14:54:
>>> Michael,
>>>
>>> On Wed, Jul 20, 2011 at 11:09 AM, Michael J Gruber
>>> <git@drmicha.warpmail.net> wrote:
>>>> 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.
>>
>> Well sure it is. We do that and discuss the merits of patches.
>>
>> I do use format-patch/send-email, and as I explained, your patch would
>> make that more difficult. If there is something that it makes better
>> that may outweigh it. Can you explain what improvement this (ignoring
>> *.patch) introduces?
> 
> I'm not sure how listing all the patches that you have under "git
> status" will help you not to send a wrong one.

Seeing various patch files in "git status" bothered me as well.

So I put all my patches in a top-level patches/ directory, along with a
patches/.gitignore file that ignores everything there.

If that doesn't meet your needs, you could instead add a core.excludesfile
entry to your ~/.gitconfig, and in there ignore *.patch files.

So given those alternatives, I'm not convinced your patch is suitable for all
git users.

		M.

  parent reply	other threads:[~2011-07-21 14:50 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
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 [this message]
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=4E283C9E.2050000@xiplink.com \
    --to=marcnarc@xiplink.com \
    --cc=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 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).