* [PATCH] gitignore: add top level patch ignore rule @ 2011-07-19 22:17 Vitaliy Ivanov 2011-07-20 8:09 ` Michael J Gruber 0 siblings, 1 reply; 8+ messages in thread From: Vitaliy Ivanov @ 2011-07-19 22:17 UTC (permalink / raw) To: Junio C Hamano, Git List; +Cc: Vitaliy Ivanov Add top level ignore rule for patches created by format-patch command. On the way, reorganize ignore rules and add comments. 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/ -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] gitignore: add top level patch ignore rule 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 0 siblings, 1 reply; 8+ messages in thread From: Michael J Gruber @ 2011-07-20 8:09 UTC (permalink / raw) To: vitalivanov; +Cc: Junio C Hamano, Git List 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/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gitignore: add top level patch ignore rule 2011-07-20 8:09 ` Michael J Gruber @ 2011-07-21 12:54 ` Vitaliy Ivanov 2011-07-21 13:02 ` Michael J Gruber 0 siblings, 1 reply; 8+ messages in thread From: Vitaliy Ivanov @ 2011-07-21 12:54 UTC (permalink / raw) To: Michael J Gruber; +Cc: Junio C Hamano, Git List 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. > >> 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. > >> >> 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/ > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gitignore: add top level patch ignore rule 2011-07-21 12:54 ` Vitaliy Ivanov @ 2011-07-21 13:02 ` Michael J Gruber 2011-07-21 13:22 ` Vitaliy Ivanov 0 siblings, 1 reply; 8+ messages in thread From: Michael J Gruber @ 2011-07-21 13:02 UTC (permalink / raw) To: Vitaliy Ivanov; +Cc: Junio C Hamano, Git List 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? >> >>> 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. That may be a sensible cleanup, and it's good to describe that in the commit message. Also, in general, we try to separate reorganisation patches from those which introduce functional changes. (One may argue whether adding *.patch falls into the latter category, though.) [patch snipped] Michael ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gitignore: add top level patch ignore rule 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 0 siblings, 2 replies; 8+ messages in thread From: Vitaliy Ivanov @ 2011-07-21 13:22 UTC (permalink / raw) To: Michael J Gruber; +Cc: Junio C Hamano, Git List 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. Also we are talking about /*.patch rule and not *.patch as with such rule: [vitaliy.ivanov@vivanov git]$ git ls-files -i --exclude-standard contrib/patches/docbook-xsl-manpages-charmap.patch t/t4100/t-apply-1.patch t/t4100/t-apply-2.patch t/t4100/t-apply-3.patch t/t4100/t-apply-4.patch t/t4100/t-apply-5.patch t/t4100/t-apply-6.patch t/t4100/t-apply-7.patch t/t4100/t-apply-8.patch t/t4100/t-apply-9.patch t/t4109/patch1.patch t/t4109/patch2.patch t/t4109/patch3.patch t/t4109/patch4.patch t/t4110/patch1.patch t/t4110/patch2.patch t/t4110/patch3.patch t/t4110/patch4.patch t/t4110/patch5.patch >>>> 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. > > That may be a sensible cleanup, and it's good to describe that in the > commit message. Also, in general, we try to separate reorganisation > patches from those which introduce functional changes. (One may argue > whether adding *.patch falls into the latter category, though.) Yeah, I should agree here. I can resend it w/o adding new rules but simple reorganization and, of course, description for this change. Vitaliy ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gitignore: add top level patch ignore rule 2011-07-21 13:22 ` Vitaliy Ivanov @ 2011-07-21 13:29 ` Michael J Gruber 2011-07-21 14:50 ` Marc Branchaud 1 sibling, 0 replies; 8+ messages in thread From: Michael J Gruber @ 2011-07-21 13:29 UTC (permalink / raw) To: Vitaliy Ivanov; +Cc: Junio C Hamano, Git List Vitaliy Ivanov venit, vidit, dixit 21.07.2011 15:22: > 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. Well, in order to get this patch in, you will have to explain what it is good for (not that I'd decide that, but that's my recommendation for you). I've asked twice and I'm still waiting for an explanation. OTOH, I've explained in detail why I consider this change bad. Please reread my first reply. > Also we are talking about /*.patch rule and not *.patch as with such rule: Sure. Michael ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gitignore: add top level patch ignore rule 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 1 sibling, 1 reply; 8+ messages in thread From: Marc Branchaud @ 2011-07-21 14:50 UTC (permalink / raw) To: Vitaliy Ivanov; +Cc: Michael J Gruber, Junio C Hamano, Git List 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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gitignore: add top level patch ignore rule 2011-07-21 14:50 ` Marc Branchaud @ 2011-07-22 13:20 ` Vitaliy Ivanov 0 siblings, 0 replies; 8+ messages in thread From: Vitaliy Ivanov @ 2011-07-22 13:20 UTC (permalink / raw) To: Marc Branchaud; +Cc: Michael J Gruber, Junio C Hamano, Git List On Thu, Jul 21, 2011 at 5:50 PM, Marc Branchaud <marcnarc@xiplink.com> wrote: > 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. Sure. It's not a problem. And thanks for describing workarounds here. Actually, this issue is not bothering me a lot but I know that's a usual practice to put patches to git ignore list. That's why I proposed it to the list. Vitaliy ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-07-22 13:20 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2011-07-22 13:20 ` Vitaliy Ivanov
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).