unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Minor doc improvement in nt/INSTALL.W64
@ 2016-08-20 19:34 Alain Schneble
  2016-09-19  1:47 ` Nikolay Kudryavtsev
  0 siblings, 1 reply; 6+ messages in thread
From: Alain Schneble @ 2016-08-20 19:34 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

Hello

Once again, I stumbled across the newline issue when running autogen.sh
on MS Windows, caused by a wrong GIT/core.autocrlf setting.  In this
regard, I think it would be worth to refine a passage in nt/INSTALL.W64
as follows:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Doc improvement in nt/INSTALL.W64 --]
[-- Type: text/x-patch, Size: 1000 bytes --]

From dd2f6178176a78d4440776addb68c842a7be58dc Mon Sep 17 00:00:00 2001
From: Alain Schneble <a.s@realize.ch>
Date: Sat, 20 Aug 2016 21:01:04 +0200
Subject: [PATCH] Refine comment on GIT core.autocrlf in nt/INSTALL.W64

---
 nt/INSTALL.W64 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
index e109c6f..970bb20 100644
--- a/nt/INSTALL.W64
+++ b/nt/INSTALL.W64
@@ -85,7 +85,14 @@ in your MSYS2 environment with:
 The autocrlf feature of Git may interfere with the configure file, so it is
 best to disable this feature by running the command:
 
-  git config core.autocrlf false
+  git config --global core.autocrlf false
+
+The --global (or --system) option is required as the configuration
+variable must be set before cloning the GIT repository.
+Alternatively, to use a repository-local variable, specify --config
+option to git clone:
+
+  git clone --config core.autocrlf=false ...
 
 * Get the Emacs source code
 
-- 
2.8.1.windows.1


[-- Attachment #3: Type: text/plain, Size: 30 bytes --]


Do you agree?

Thanks,
Alain

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

* Re: Minor doc improvement in nt/INSTALL.W64
  2016-08-20 19:34 Minor doc improvement in nt/INSTALL.W64 Alain Schneble
@ 2016-09-19  1:47 ` Nikolay Kudryavtsev
  2016-09-19  6:33   ` Alain Schneble
  2016-09-19 16:41   ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Nikolay Kudryavtsev @ 2016-09-19  1:47 UTC (permalink / raw)
  To: Alain Schneble, emacs-devel

Hello. I'm not sure if the current procedure for this, as described in 
INSTALL and INSTALL.W64, is optimal.

I think you can just clone the repo and do:

git config core.eol false
git config core.safecrlf false
git config core.autocrlf false
git rm --cached -r .
git reset --hard

I tried repeating the issue, autogen.sh breaks on normal clone, this 
fixes it like the current procedure, but this does not require cloning 
again and does not touch the global git config.

-- 
Best Regards,
Nikolay Kudryavtsev




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

* Re: Minor doc improvement in nt/INSTALL.W64
  2016-09-19  1:47 ` Nikolay Kudryavtsev
@ 2016-09-19  6:33   ` Alain Schneble
  2016-09-19 11:06     ` Nikolay Kudryavtsev
  2016-09-19 16:41   ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Alain Schneble @ 2016-09-19  6:33 UTC (permalink / raw)
  To: Nikolay Kudryavtsev; +Cc: emacs-devel

Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> writes:

> I think you can just clone the repo and do:
>
> git config core.eol false
> git config core.safecrlf false
> git config core.autocrlf false
> git rm --cached -r .
> git reset --hard
>
> I tried repeating the issue, autogen.sh breaks on normal clone, this
> fixes it like the current procedure, but this does not require cloning
> again and does not touch the global git config.

FWIW, `git clone --config ...' doesn't touch global git config either.
This should be mentioned before a procedure like you propose, I think.
That's what I tried to document with the patch in my previous message:
https://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00416.html.

I'm not even sure if the procedure of "how to fix an already checked out
repository" should be part of this document.

Maybe `git clone --config ...' should be the preferred choice over the
option of altering the global git config?

Alain




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

* Re: Minor doc improvement in nt/INSTALL.W64
  2016-09-19  6:33   ` Alain Schneble
@ 2016-09-19 11:06     ` Nikolay Kudryavtsev
  0 siblings, 0 replies; 6+ messages in thread
From: Nikolay Kudryavtsev @ 2016-09-19 11:06 UTC (permalink / raw)
  To: Alain Schneble; +Cc: emacs-devel

How to fix already checked out repository is better to mention, imho, 
because a broken checked out repostitory is what most people would start 
with. They clone the repo first and only then read the instructions.

`git clone --config ...' is probaly should be mentioned too, but in 
http://savannah.gnu.org/git/?group=emacs and not INSTALL. And even if we 
mention it there, someone would probably still just copypaste the basic 
instruction and end up with a broken repo.

-- 
Best Regards,
Nikolay Kudryavtsev




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

* Re: Minor doc improvement in nt/INSTALL.W64
  2016-09-19  1:47 ` Nikolay Kudryavtsev
  2016-09-19  6:33   ` Alain Schneble
@ 2016-09-19 16:41   ` Eli Zaretskii
  2016-09-29  9:17     ` Nikolay Kudryavtsev
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2016-09-19 16:41 UTC (permalink / raw)
  To: Nikolay Kudryavtsev; +Cc: a.s, emacs-devel

> From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
> Date: Mon, 19 Sep 2016 04:47:27 +0300
> 
> Hello. I'm not sure if the current procedure for this, as described in 
> INSTALL and INSTALL.W64, is optimal.
> 
> I think you can just clone the repo and do:
> 
> git config core.eol false
> git config core.safecrlf false
> git config core.autocrlf false
> git rm --cached -r .
> git reset --hard
> 
> I tried repeating the issue, autogen.sh breaks on normal clone, this 
> fixes it like the current procedure, but this does not require cloning 
> again and does not touch the global git config.

There are many different ways to cut a cake with Git.  Problem is, not
all of them work with all the versions of Git.

Unless something is really wrong with the recipe in nt/INSTALL, I
don't think it's a good idea to confuse the readers by presenting
additional methods.  This problem is supposed to be very rare anyway.

Thanks.



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

* Re: Minor doc improvement in nt/INSTALL.W64
  2016-09-19 16:41   ` Eli Zaretskii
@ 2016-09-29  9:17     ` Nikolay Kudryavtsev
  0 siblings, 0 replies; 6+ messages in thread
From: Nikolay Kudryavtsev @ 2016-09-29  9:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: a.s, emacs-devel

Since we're talking about Windows here, forcing people to use somewhat 
new version of git there is not that bad. That said, I don't think that 
those commands(config, rm and reset) work differently even in much older 
versions of git. If they do, it's a bug in those versions.

Automatic line ending conversions by default is really a great feature 
of git. For comparison, in hg you have to explicitly enable an extension 
for that. Then, when you enabled that extension, those people who did 
not, can still commit to your repo and screw your line endings. So, the 
problem case here - someone builds Emacs, touches his global gitconfig, 
then commits to some other project and screws up line endings there. 
It's not something that's "really wrong", just moderately, but fixing 
instructions is pretty easy.

Due to those reasons, I believe if we want to suggest one way of doing 
things, config-rm-reset is the one we want to use. But again, it's your 
call.

-- 
Best Regards,
Nikolay Kudryavtsev




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

end of thread, other threads:[~2016-09-29  9:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-20 19:34 Minor doc improvement in nt/INSTALL.W64 Alain Schneble
2016-09-19  1:47 ` Nikolay Kudryavtsev
2016-09-19  6:33   ` Alain Schneble
2016-09-19 11:06     ` Nikolay Kudryavtsev
2016-09-19 16:41   ` Eli Zaretskii
2016-09-29  9:17     ` Nikolay Kudryavtsev

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).