* [PATCH] Remove *.orig pattern from .gitignore
@ 2024-07-29 15:57 Laurent Pinchart
2024-08-01 1:11 ` Nathan Chancellor
0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2024-07-29 15:57 UTC (permalink / raw)
To: linux-kernel
Cc: Masahiro Yamada, Nathan Chancellor, Mickaël Salaün,
Íñigo Huguet, Laurent Pinchart, Thomas Weißschuh,
Alexey Dobriyan, S.Çağlar Onur
Commit 3f1b0e1f2875 (".gitignore update") added *.orig and *.rej
patterns to .gitignore in v2.6.23. The commit message didn't give a
rationale. Later on, commit 1f5d3a6b6532 ("Remove *.rej pattern from
.gitignore") removed the *.rej pattern in v2.6.26, on the rationale that
*.rej files indicated something went really wrong and should not be
ignored.
The *.rej files are now shown by `git status`, which helps located
conflicts when applying patches and lowers the probability that they
will go unnoticed. It is however still easy to overlook the *.orig files
which slowly polute the source tree. That's not as big of a deal as not
noticing a conflict, but it's still not nice.
Drop the *.orig pattern from .gitignore to avoid this and help keep the
source tree clean.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
As this has been in the tree for so long and appears not to have botherd
anyone, I have a strong feeling I've overlooked something and this patch
will be rejected. I've actually had that feeling for a few years
already, and today I decided that maybe everybody else used the exact
same reasoning, explaining why the annoying *.orig pattern is still in
.gitignore.
---
.gitignore | 1 -
1 file changed, 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 7902adf4f7f1..58fdbb35e2f1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -142,7 +142,6 @@ GTAGS
# id-utils files
ID
-*.orig
*~
\#*#
base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Remove *.orig pattern from .gitignore 2024-07-29 15:57 [PATCH] Remove *.orig pattern from .gitignore Laurent Pinchart @ 2024-08-01 1:11 ` Nathan Chancellor 2024-08-17 19:33 ` Laurent Pinchart 0 siblings, 1 reply; 5+ messages in thread From: Nathan Chancellor @ 2024-08-01 1:11 UTC (permalink / raw) To: Laurent Pinchart Cc: linux-kernel, Masahiro Yamada, Mickaël Salaün, Íñigo Huguet, Thomas Weißschuh, Alexey Dobriyan, S.Çağlar Onur On Mon, Jul 29, 2024 at 06:57:38PM +0300, Laurent Pinchart wrote: > Commit 3f1b0e1f2875 (".gitignore update") added *.orig and *.rej > patterns to .gitignore in v2.6.23. The commit message didn't give a > rationale. Later on, commit 1f5d3a6b6532 ("Remove *.rej pattern from > .gitignore") removed the *.rej pattern in v2.6.26, on the rationale that > *.rej files indicated something went really wrong and should not be > ignored. > > The *.rej files are now shown by `git status`, which helps located > conflicts when applying patches and lowers the probability that they > will go unnoticed. It is however still easy to overlook the *.orig files > which slowly polute the source tree. That's not as big of a deal as not > noticing a conflict, but it's still not nice. > > Drop the *.orig pattern from .gitignore to avoid this and help keep the > source tree clean. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > As this has been in the tree for so long and appears not to have botherd > anyone, I have a strong feeling I've overlooked something and this patch > will be rejected. I've actually had that feeling for a few years > already, and today I decided that maybe everybody else used the exact > same reasoning, explaining why the annoying *.orig pattern is still in > .gitignore. I don't really have a strong opinion myself but it does seem reasonable to be consistent. For what it's worth, Stephen Rothwell checks for accidentally added .orig and .rej files in -next (and catches them occasionally [1]), so I wouldn't expect removing this to matter much. [1]: https://lore.kernel.org/linux-next/?q=.rej > --- > .gitignore | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/.gitignore b/.gitignore > index 7902adf4f7f1..58fdbb35e2f1 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -142,7 +142,6 @@ GTAGS > # id-utils files > ID > > -*.orig > *~ > \#*# > > > base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b > -- > Regards, > > Laurent Pinchart > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Remove *.orig pattern from .gitignore 2024-08-01 1:11 ` Nathan Chancellor @ 2024-08-17 19:33 ` Laurent Pinchart 2024-08-17 19:49 ` Laurent Pinchart 2024-08-18 12:20 ` Masahiro Yamada 0 siblings, 2 replies; 5+ messages in thread From: Laurent Pinchart @ 2024-08-17 19:33 UTC (permalink / raw) To: Nathan Chancellor Cc: linux-kernel, Masahiro Yamada, Mickaël Salaün, Íñigo Huguet, Thomas Weißschuh, Alexey Dobriyan, S.Çağlar Onur On Wed, Jul 31, 2024 at 06:11:20PM -0700, Nathan Chancellor wrote: > On Mon, Jul 29, 2024 at 06:57:38PM +0300, Laurent Pinchart wrote: > > Commit 3f1b0e1f2875 (".gitignore update") added *.orig and *.rej > > patterns to .gitignore in v2.6.23. The commit message didn't give a > > rationale. Later on, commit 1f5d3a6b6532 ("Remove *.rej pattern from > > .gitignore") removed the *.rej pattern in v2.6.26, on the rationale that > > *.rej files indicated something went really wrong and should not be > > ignored. > > > > The *.rej files are now shown by `git status`, which helps located > > conflicts when applying patches and lowers the probability that they > > will go unnoticed. It is however still easy to overlook the *.orig files > > which slowly polute the source tree. That's not as big of a deal as not > > noticing a conflict, but it's still not nice. > > > > Drop the *.orig pattern from .gitignore to avoid this and help keep the > > source tree clean. > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > As this has been in the tree for so long and appears not to have botherd > > anyone, I have a strong feeling I've overlooked something and this patch > > will be rejected. I've actually had that feeling for a few years > > already, and today I decided that maybe everybody else used the exact > > same reasoning, explaining why the annoying *.orig pattern is still in > > .gitignore. > > I don't really have a strong opinion myself but it does seem reasonable > to be consistent. For what it's worth, Stephen Rothwell checks for > accidentally added .orig and .rej files in -next (and catches them > occasionally [1]), so I wouldn't expect removing this to matter much. > > [1]: https://lore.kernel.org/linux-next/?q=.rej I didn't know that, it's useful information, thanks. I wonder if checkpatch.pl could also check for that ? Although git-add already warns unless you specify -f, so people ignoring that may also ignore checkpatch.pl, I'm not sure. Who decides on whether this patch should be merged ? > > --- > > .gitignore | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/.gitignore b/.gitignore > > index 7902adf4f7f1..58fdbb35e2f1 100644 > > --- a/.gitignore > > +++ b/.gitignore > > @@ -142,7 +142,6 @@ GTAGS > > # id-utils files > > ID > > > > -*.orig > > *~ > > \#*# > > > > > > base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Remove *.orig pattern from .gitignore 2024-08-17 19:33 ` Laurent Pinchart @ 2024-08-17 19:49 ` Laurent Pinchart 2024-08-18 12:20 ` Masahiro Yamada 1 sibling, 0 replies; 5+ messages in thread From: Laurent Pinchart @ 2024-08-17 19:49 UTC (permalink / raw) To: Nathan Chancellor Cc: linux-kernel, Masahiro Yamada, Mickaël Salaün, Íñigo Huguet, Thomas Weißschuh, Alexey Dobriyan, S.Çağlar Onur On Sat, Aug 17, 2024 at 10:33:42PM +0300, Laurent Pinchart wrote: > On Wed, Jul 31, 2024 at 06:11:20PM -0700, Nathan Chancellor wrote: > > On Mon, Jul 29, 2024 at 06:57:38PM +0300, Laurent Pinchart wrote: > > > Commit 3f1b0e1f2875 (".gitignore update") added *.orig and *.rej > > > patterns to .gitignore in v2.6.23. The commit message didn't give a > > > rationale. Later on, commit 1f5d3a6b6532 ("Remove *.rej pattern from > > > .gitignore") removed the *.rej pattern in v2.6.26, on the rationale that > > > *.rej files indicated something went really wrong and should not be > > > ignored. > > > > > > The *.rej files are now shown by `git status`, which helps located > > > conflicts when applying patches and lowers the probability that they > > > will go unnoticed. It is however still easy to overlook the *.orig files > > > which slowly polute the source tree. That's not as big of a deal as not > > > noticing a conflict, but it's still not nice. > > > > > > Drop the *.orig pattern from .gitignore to avoid this and help keep the > > > source tree clean. > > > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > --- > > > As this has been in the tree for so long and appears not to have botherd > > > anyone, I have a strong feeling I've overlooked something and this patch > > > will be rejected. I've actually had that feeling for a few years > > > already, and today I decided that maybe everybody else used the exact > > > same reasoning, explaining why the annoying *.orig pattern is still in > > > .gitignore. > > > > I don't really have a strong opinion myself but it does seem reasonable > > to be consistent. For what it's worth, Stephen Rothwell checks for > > accidentally added .orig and .rej files in -next (and catches them > > occasionally [1]), so I wouldn't expect removing this to matter much. > > > > [1]: https://lore.kernel.org/linux-next/?q=.rej > > I didn't know that, it's useful information, thanks. I wonder if > checkpatch.pl could also check for that ? Although git-add already > warns unless you specify -f, so people ignoring that may also ignore > checkpatch.pl, I'm not sure. And I should obviously wake up before writing e-mails. This patch removes the pattern from .gitignore, so git-add won't warn. A checkpatch.pl check could make sense. > Who decides on whether this patch should be merged ? > > > > --- > > > .gitignore | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/.gitignore b/.gitignore > > > index 7902adf4f7f1..58fdbb35e2f1 100644 > > > --- a/.gitignore > > > +++ b/.gitignore > > > @@ -142,7 +142,6 @@ GTAGS > > > # id-utils files > > > ID > > > > > > -*.orig > > > *~ > > > \#*# > > > > > > > > > base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Remove *.orig pattern from .gitignore 2024-08-17 19:33 ` Laurent Pinchart 2024-08-17 19:49 ` Laurent Pinchart @ 2024-08-18 12:20 ` Masahiro Yamada 1 sibling, 0 replies; 5+ messages in thread From: Masahiro Yamada @ 2024-08-18 12:20 UTC (permalink / raw) To: Laurent Pinchart Cc: Nathan Chancellor, linux-kernel, Mickaël Salaün, Íñigo Huguet, Thomas Weißschuh, Alexey Dobriyan, S.Çağlar Onur On Sun, Aug 18, 2024 at 4:34 AM Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > > On Wed, Jul 31, 2024 at 06:11:20PM -0700, Nathan Chancellor wrote: > > On Mon, Jul 29, 2024 at 06:57:38PM +0300, Laurent Pinchart wrote: > > > Commit 3f1b0e1f2875 (".gitignore update") added *.orig and *.rej > > > patterns to .gitignore in v2.6.23. The commit message didn't give a > > > rationale. Later on, commit 1f5d3a6b6532 ("Remove *.rej pattern from > > > .gitignore") removed the *.rej pattern in v2.6.26, on the rationale that > > > *.rej files indicated something went really wrong and should not be > > > ignored. > > > > > > The *.rej files are now shown by `git status`, which helps located > > > conflicts when applying patches and lowers the probability that they > > > will go unnoticed. It is however still easy to overlook the *.orig files > > > which slowly polute the source tree. That's not as big of a deal as not > > > noticing a conflict, but it's still not nice. > > > > > > Drop the *.orig pattern from .gitignore to avoid this and help keep the > > > source tree clean. > > > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > --- > > > As this has been in the tree for so long and appears not to have botherd > > > anyone, I have a strong feeling I've overlooked something and this patch > > > will be rejected. I've actually had that feeling for a few years > > > already, and today I decided that maybe everybody else used the exact > > > same reasoning, explaining why the annoying *.orig pattern is still in > > > .gitignore. > > > > I don't really have a strong opinion myself but it does seem reasonable > > to be consistent. For what it's worth, Stephen Rothwell checks for > > accidentally added .orig and .rej files in -next (and catches them > > occasionally [1]), so I wouldn't expect removing this to matter much. > > > > [1]: https://lore.kernel.org/linux-next/?q=.rej > > I didn't know that, it's useful information, thanks. I wonder if > checkpatch.pl could also check for that ? Although git-add already > warns unless you specify -f, so people ignoring that may also ignore > checkpatch.pl, I'm not sure. > > Who decides on whether this patch should be merged ? This is kind of subjective, but so far, nobody has expressed a strong opposition. I do not have a strong opinion, because I can ignore *.orig from my ~/.config/git/ignore anyway. I tend to want to ignore '*.orig', so I already have *.orig in my ~/.config/git/ignore. I will pick up this with a little further rationale from me: [masahiroy@kernel.org: I do not have a strong opinion about this. Perhaps some people may have a different opinion. If you are someone who wants to ignore *.orig, it is likely you would want to do so across all projects. Then, $XDG_CONFIG_HOME/git/ignore would be more suitable for your needs. gitignore(5) suggests, "Patterns which a user wants Git to ignore in all situations generally go into a file specified by core.excludesFile in the user's ~/.gitconfig". Please note that you cannot do the opposite; if *.orig is ignored by the project's .gitignore, you cannot override the decision because $XDG_CONFIG_HOME/git/ignore has a lower priority. If *.orig is sitting on the fence, I'd leave it to the users. ] -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-18 12:21 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-07-29 15:57 [PATCH] Remove *.orig pattern from .gitignore Laurent Pinchart 2024-08-01 1:11 ` Nathan Chancellor 2024-08-17 19:33 ` Laurent Pinchart 2024-08-17 19:49 ` Laurent Pinchart 2024-08-18 12:20 ` Masahiro Yamada
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox