[PATCH] Really ignore .patch files

--------------030708030005060005040501
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

G'day p5p,

Having now created a few .patch files, it appears the current .gitignore in
blead is reporting them as untracked, rather than simply ignoring them.

The attached patch adjusts the .gitignore file to really ignore .patch files.

Many thanks to Abigail for super-fast application of my other patches.

Cheerio,

	Paul


-- 
Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/
Director of Training                   | Ph:  +61 3 9354 6001
Perl Training Australia                | Fax: +61 3 9354 2681

--------------030708030005060005040501
Content-Type: text/x-patch;
 name="0001-.patch-files-are-really-ignored-now.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="0001-.patch-files-are-really-ignored-now.patch"

From 737cfd8db12834b82663d115db1407122ec8de7c Mon Sep 17 00:00:00 2001
From: Paul Fenwick <pjf@perltraining.com.au>
Date: Sun, 21 Dec 2008 00:43:52 +1100
Subject: [PATCH] .patch files are really ignored now.

---
 .gitignore |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/.gitignore b/.gitignore
index b4a3cb8..594b4de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-.patch
+*.patch
 .config
 
 # files produced by './configure.gnu' on a Linux machine
-- 
1.5.2.2


--------------030708030005060005040501--
0
pjf
12/20/2008 1:46:34 PM
perl.perl5.porters 48287 articles. 1 followers. Follow

4 Replies
353 Views

Similar Articles

[PageSpeed] 30
Get it on Google Play
Get it on Apple App Store

On Sat, Dec 20, 2008 at 10:46:34PM +0900, Paul Fenwick wrote:
> G'day p5p,
> 
> Having now created a few .patch files, it appears the current .gitignore in
> blead is reporting them as untracked, rather than simply ignoring them.
> 
> The attached patch adjusts the .gitignore file to really ignore .patch files.
> 
> Many thanks to Abigail for super-fast application of my other patches.
> 


Thanks, applied as e9040dfd2ecb1af73aed6d274a802c37856d7c74.


Abigail
0
abigail
12/20/2008 2:01:40 PM
2008/12/20 Paul Fenwick <pjf@perltraining.com.au>:
> G'day p5p,
>
> Having now created a few .patch files, it appears the current .gitignore in
> blead is reporting them as untracked, rather than simply ignoring them.
>
> The attached patch adjusts the .gitignore file to really ignore .patch files.
>
> Many thanks to Abigail for super-fast application of my other patches.

Umm, confused, when you say you were creating .patch files and they
werent being ignored, what do you mean?

..patch files are supposed to live in the root directory, and there
should only be one of them, and as far as i could tell it was being
ignored. So, whats the story?

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
0
demerphq
12/20/2008 2:16:09 PM
G'day Yves / p5p,

demerphq wrote:

> Umm, confused, when you say you were creating .patch files and they
> werent being ignored, what do you mean?

When I do a 'git format-patch', it generates a file with a .patch extension:

	$ ls *.patch
	0001-.patch-files-are-really-ignored-now.patch
	0001-Autodie-1.997.patch

I'd love for git not to track these files, but I have the sinking suspicion
they're not the .patch files that you're thinking of.  ;)

I do note that there are what appear to be legitimately tracked files in
Cross with .patch extensions, but my git seems to be still tracking them.

Cheerio,

	Paul

-- 
Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/
Director of Training                   | Ph:  +61 3 9354 6001
Perl Training Australia                | Fax: +61 3 9354 2681
0
pjf
12/20/2008 2:28:54 PM
2008/12/20 Paul Fenwick <pjf@perltraining.com.au>:
> G'day Yves / p5p,
>
> demerphq wrote:
>
>> Umm, confused, when you say you were creating .patch files and they
>> werent being ignored, what do you mean?
>
> When I do a 'git format-patch', it generates a file with a .patch extension:
>
>        $ ls *.patch
>        0001-.patch-files-are-really-ignored-now.patch
>        0001-Autodie-1.997.patch
>
> I'd love for git not to track these files, but I have the sinking suspicion
> they're not the .patch files that you're thinking of.  ;)

No they arent. :-) No i get it.

OTOH, you *can* tell git format-patch to put the patches in a specific
directory. ;-)

> I do note that there are what appear to be legitimately tracked files in
> Cross with .patch extensions, but my git seems to be still tracking them.

This is one thing about .gitignore that seems to not be very obvious
to people, as I've seen this comment in many different places,
including at work. The explanation is that .gitignore applies ONLY to
untracked files. So if you explicitly add a file that would be
otherwise be ignored then git will track it, .gitignore or not.

Cheers,
yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
0
demerphq
12/20/2008 2:33:56 PM
Reply: