diff mbox

gitignore: Add entry for *.patch

Message ID da0e75acb071560d79fc806cb722196442d3fb8d.1379338289.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Sept. 16, 2013, 1:31 p.m. UTC
Patches created using git aren't part of repository and shouldn't be counted to
mark repo as dirty. Mark an entry into .gitignore for these.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Pfaff Sept. 16, 2013, 4:15 p.m. UTC | #1
On Mon, Sep 16, 2013 at 07:01:43PM +0530, Viresh Kumar wrote:
> Patches created using git aren't part of repository and shouldn't be counted to
> mark repo as dirty. Mark an entry into .gitignore for these.

Usually we use .gitignore for files generated by configuring and
building Open vSwitch.  The build system doesn't generated patches, so
if you tend to generate them and want Git to ignore them, then I
suggest putting *.patch in your core.excludesfile file (see
gitignore(5) if you don't know about that setting).
Viresh Kumar Sept. 16, 2013, 4:55 p.m. UTC | #2
On 16 September 2013 21:45, Ben Pfaff <blp@nicira.com> wrote:
> On Mon, Sep 16, 2013 at 07:01:43PM +0530, Viresh Kumar wrote:
>> Patches created using git aren't part of repository and shouldn't be counted to
>> mark repo as dirty. Mark an entry into .gitignore for these.
>
> Usually we use .gitignore for files generated by configuring and
> building Open vSwitch.  The build system doesn't generated patches, so
> if you tend to generate them and want Git to ignore them, then I
> suggest putting *.patch in your core.excludesfile file (see
> gitignore(5) if you don't know about that setting).

Yes, that's one way.. But the build systems work the same everywhere.
Same is true for Linux as well..

*.patch is probably added only for developers and not for build system.
Ben Pfaff Sept. 16, 2013, 5:01 p.m. UTC | #3
On Mon, Sep 16, 2013 at 10:25:55PM +0530, Viresh Kumar wrote:
> On 16 September 2013 21:45, Ben Pfaff <blp@nicira.com> wrote:
> > On Mon, Sep 16, 2013 at 07:01:43PM +0530, Viresh Kumar wrote:
> >> Patches created using git aren't part of repository and shouldn't be counted to
> >> mark repo as dirty. Mark an entry into .gitignore for these.
> >
> > Usually we use .gitignore for files generated by configuring and
> > building Open vSwitch.  The build system doesn't generated patches, so
> > if you tend to generate them and want Git to ignore them, then I
> > suggest putting *.patch in your core.excludesfile file (see
> > gitignore(5) if you don't know about that setting).
> 
> Yes, that's one way.. But the build systems work the same everywhere.
> Same is true for Linux as well..
> *.patch is probably added only for developers and not for build system.

Open vSwitch is different from the Linux kernel in many ways.  Their
build systems certainly do not "work the same".

Personally I find "git status" pointing out stray patch files to be a
useful reminder to remove them.  I guess you don't, so feel free to
add *.patch to your git excludes file.
diff mbox

Patch

diff --git a/.gitignore b/.gitignore
index 60ed30d..bfe1993 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@ 
 *.so
 *~
 *,cover
+*.patch
 .#*
 .*.cmd
 .*.swp