public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add config.log to .gitignore
@ 2023-03-21 12:24 Rong Tao
  2023-03-21 12:38 ` Xi Ruoyao
  0 siblings, 1 reply; 6+ messages in thread
From: Rong Tao @ 2023-03-21 12:24 UTC (permalink / raw)
  To: libc-alpha; +Cc: rongtao, rtoax

From: Rong Tao <rongtao@cestc.cn>

Ignore generated config.log log file.

Signed-off-by: Rong Tao <rongtao@cestc.cn>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 07d4a129e5dc..115d50ef48d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@ copying.*
 glibc-*
 
 configparms
+config.log
 
 ieeetest
 regex
-- 
2.39.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add config.log to .gitignore
  2023-03-21 12:24 [PATCH] Add config.log to .gitignore Rong Tao
@ 2023-03-21 12:38 ` Xi Ruoyao
  2023-03-21 14:10   ` =?gb18030?B?yNnMzg==?=
  0 siblings, 1 reply; 6+ messages in thread
From: Xi Ruoyao @ 2023-03-21 12:38 UTC (permalink / raw)
  To: Rong Tao, libc-alpha; +Cc: rongtao

On Tue, 2023-03-21 at 20:24 +0800, Rong Tao via Libc-alpha wrote:
> From: Rong Tao <rongtao@cestc.cn>
> 
> Ignore generated config.log log file.

How the config.log file could ever be here?  We are saying:

The GNU C Library cannot be compiled in the source directory.  You must
build it in a separate build directory.

in the README file.

> 
> Signed-off-by: Rong Tao <rongtao@cestc.cn>
> ---
>  .gitignore | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/.gitignore b/.gitignore
> index 07d4a129e5dc..115d50ef48d6 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -15,6 +15,7 @@ copying.*
>  glibc-*
>  
>  configparms
> +config.log
>  
>  ieeetest
>  regex

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add config.log to .gitignore
  2023-03-21 12:38 ` Xi Ruoyao
@ 2023-03-21 14:10   ` =?gb18030?B?yNnMzg==?=
  2023-03-22 16:01     ` Zack Weinberg
  0 siblings, 1 reply; 6+ messages in thread
From: =?gb18030?B?yNnMzg==?= @ 2023-03-21 14:10 UTC (permalink / raw)
  To: =?gb18030?B?WGkgUnVveWFv?=, =?gb18030?B?bGliYy1hbHBoYQ==?=
  Cc: =?gb18030?B?cm9uZ3Rhbw==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 33 bytes --]

You are right, sorry, my mistake.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add config.log to .gitignore
  2023-03-21 14:10   ` =?gb18030?B?yNnMzg==?=
@ 2023-03-22 16:01     ` Zack Weinberg
  2023-03-22 16:26       ` Xi Ruoyao
  0 siblings, 1 reply; 6+ messages in thread
From: Zack Weinberg @ 2023-03-22 16:01 UTC (permalink / raw)
  To: libc-alpha

On 2023-03-21 10:10 AM, 荣涛 via Libc-alpha wrote:
>> How the config.log file could ever be here?
> You are right, sorry, my mistake.

I think the patch is desirable anyway.  If someone makes a mistake and
runs configure in the source directory, configure errors out, but it
does so *after* creating config.log in the source directory.  If this
hypothetical someone goes on to create a separate build directory and
do some hacking, and eventually runs 'git commit -a' without carefully 
checking what files are new or modified in the source directory, 
config.log could get added to the commit.  Adding config.log to 
.gitignore protects against this chain of human errors.

zw

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add config.log to .gitignore
  2023-03-22 16:01     ` Zack Weinberg
@ 2023-03-22 16:26       ` Xi Ruoyao
  2023-03-22 20:14         ` Zack Weinberg
  0 siblings, 1 reply; 6+ messages in thread
From: Xi Ruoyao @ 2023-03-22 16:26 UTC (permalink / raw)
  To: Zack Weinberg, libc-alpha

On Wed, 2023-03-22 at 12:01 -0400, Zack Weinberg via Libc-alpha wrote:
> On 2023-03-21 10:10 AM, 荣涛 via Libc-alpha wrote:
> > > How the config.log file could ever be here?
> > You are right, sorry, my mistake.
> 
> I think the patch is desirable anyway.  If someone makes a mistake and
> runs configure in the source directory, configure errors out, but it
> does so *after* creating config.log in the source directory.  If this
> hypothetical someone goes on to create a separate build directory and
> do some hacking, and eventually runs 'git commit -a' without carefully
> checking what files are new or modified in the source directory, 
> config.log could get added to the commit.  Adding config.log to 
> .gitignore protects against this chain of human errors.

I guess you mean "git add .", not "git commit -a".  The latter won't add
config.log even it's there.

I'll not object if the others think this patch can prevent a human error
from "git add .", but I just want to say "don't use `git add .`, unless,
maybe, you've visually inspected the output of `git status`".

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add config.log to .gitignore
  2023-03-22 16:26       ` Xi Ruoyao
@ 2023-03-22 20:14         ` Zack Weinberg
  0 siblings, 0 replies; 6+ messages in thread
From: Zack Weinberg @ 2023-03-22 20:14 UTC (permalink / raw)
  To: Xi Ruoyao, libc-alpha

On 2023-03-22 12:26 PM, Xi Ruoyao wrote:
> On Wed, 2023-03-22 at 12:01 -0400, Zack Weinberg via Libc-alpha wrote:
>> On 2023-03-21 10:10 AM, 荣涛 via Libc-alpha wrote:
>>>> How the config.log file could ever be here?
>>> You are right, sorry, my mistake.
>>
>> I think the patch is desirable anyway.  If someone makes a mistake [...]
> 
> I guess you mean "git add .", not "git commit -a".  The latter won't add
> config.log even it's there.

Yes, probably...

> I'll not object if the others think this patch can prevent a human error
> from "git add .", but I just want to say "don't use `git add .`, unless,
> maybe, you've visually inspected the output of `git status`".

Yes, that should be the advice for contributors, but mechanical 
backstops against human error are a good idea regardless.

I actually got into an argument with one of my coworkers once, over 
exactly what "git add" does, that only ended when we discovered he had 
become so habituated to typing "git add ." that he didn't even realize 
that that was what he was doing.

zw

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-22 20:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 12:24 [PATCH] Add config.log to .gitignore Rong Tao
2023-03-21 12:38 ` Xi Ruoyao
2023-03-21 14:10   ` =?gb18030?B?yNnMzg==?=
2023-03-22 16:01     ` Zack Weinberg
2023-03-22 16:26       ` Xi Ruoyao
2023-03-22 20:14         ` Zack Weinberg

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 read-only IMAP folder(s) and NNTP newsgroup(s).