[PATCH] .gitignore: Ignore editor backup and swap files

2014-01-16 Thread Alexander Berntsen
Signed-off-by: Alexander Berntsen alexan...@plaimi.net
---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index b5f9def..2905c21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -240,3 +240,5 @@
 *.pdb
 /Debug/
 /Release/
+*~
+.*.swp
-- 
1.8.3.2

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] .gitignore: Ignore editor backup and swap files

2014-01-16 Thread Junio C Hamano
Alexander Berntsen alexan...@plaimi.net writes:

 Signed-off-by: Alexander Berntsen alexan...@plaimi.net
 ---
  .gitignore | 2 ++
  1 file changed, 2 insertions(+)

 diff --git a/.gitignore b/.gitignore
 index b5f9def..2905c21 100644
 --- a/.gitignore
 +++ b/.gitignore
 @@ -240,3 +240,5 @@
  *.pdb
  /Debug/
  /Release/
 +*~
 +.*.swp

I personally do not mind listing these common ones too much, but if
I am not mistaken, our policy on this file so far has been that it
lists build artifacts, and not personal preference (the *.swp entry
is useless for those who never use vim, for example).

These paths that depend on your choice of the editor and other tools
can still be managed in your personal .git/info/exclude in the
meantime.

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] .gitignore: Ignore editor backup and swap files

2014-01-16 Thread Alexander Berntsen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 16/01/14 23:06, Junio C Hamano wrote:
 I personally do not mind listing these common ones too much, but if
 I am not mistaken, our policy on this file so far has been that it
  lists build artifacts, and not personal preference (the *.swp
 entry is useless for those who never use vim, for example).
I don't see any downside to having this in .gitignore. However, not
including it doesn't significantly impede my workflow either. I will
not argue ferociously for this patch's inclusion. :-)

- -- 
Alexander
alexan...@plaimi.net
http://plaimi.net/~alexander
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlLYWh8ACgkQRtClrXBQc7X7WAD9GTUId4ipGdL334Oo6Yn9duSA
qixEG95nJ2FsGz5/KNsA/icUkn2BYZRCHevsnYyUFkinOiApckkqpMOTAk5Wsd4D
=7Fvb
-END PGP SIGNATURE-
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] .gitignore: Ignore editor backup and swap files

2014-01-16 Thread Jonathan Nieder
Junio C Hamano wrote:

 These paths that depend on your choice of the editor and other tools
 can still be managed in your personal .git/info/exclude in the
 meantime.

Or $HOME/.config/git/ignore to not have to make the same setting
in every repository. :)

Maybe it would make sense to add a hint about that somewhere to
user-manual.txt.  Even better would be to automatically include some
common exclude patterns globally without requiring any manual
configuration, but that would take some care to make sure the patterns
and how to disable them are documented clearly.

-- 8 --
Subject: gitignore doc: add global gitignore to synopsis

The gitignore(5) manpage already documents $XDG_CONFIG_HOME/git/ignore
but it is easy to forget that it exists.  Add a reminder to the
synopsis.

Noticed while looking for a place to put a list of scratch filenames
in the cwd used by one's editor of choice.

Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
 Documentation/gitignore.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index f971960..37c9470 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -7,7 +7,7 @@ gitignore - Specifies intentionally untracked files to ignore
 
 SYNOPSIS
 
-$GIT_DIR/info/exclude, .gitignore
+$HOME/.config/git/ignore, $GIT_DIR/info/exclude, .gitignore
 
 DESCRIPTION
 ---
-- 
1.8.5.2

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] .gitignore: Ignore editor backup and swap files

2014-01-16 Thread Ramsay Jones
On 16/01/14 22:06, Junio C Hamano wrote:
 Alexander Berntsen alexan...@plaimi.net writes:
 
 Signed-off-by: Alexander Berntsen alexan...@plaimi.net
 ---
  .gitignore | 2 ++
  1 file changed, 2 insertions(+)

 diff --git a/.gitignore b/.gitignore
 index b5f9def..2905c21 100644
 --- a/.gitignore
 +++ b/.gitignore
 @@ -240,3 +240,5 @@
  *.pdb
  /Debug/
  /Release/
 +*~
 +.*.swp
 
 I personally do not mind listing these common ones too much, but if
 I am not mistaken, our policy on this file so far has been that it
 lists build artifacts, and not personal preference (the *.swp entry
 is useless for those who never use vim, for example).
 
 These paths that depend on your choice of the editor and other tools
 can still be managed in your personal .git/info/exclude in the
 meantime.

As a vim user, I have these set in my ~/.gitignore file, which I refer
to from ~/.gitconfig using core.excludesfile. ;-)


ATB,
Ramsay Jones



--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] .gitignore: Ignore editor backup and swap files

2014-01-16 Thread David Kastrup
Junio C Hamano gits...@pobox.com writes:

 Alexander Berntsen alexan...@plaimi.net writes:

 Signed-off-by: Alexander Berntsen alexan...@plaimi.net
 ---
  .gitignore | 2 ++
  1 file changed, 2 insertions(+)

 diff --git a/.gitignore b/.gitignore
 index b5f9def..2905c21 100644
 --- a/.gitignore
 +++ b/.gitignore
 @@ -240,3 +240,5 @@
  *.pdb
  /Debug/
  /Release/
 +*~
 +.*.swp

 I personally do not mind listing these common ones too much, but if
 I am not mistaken, our policy on this file so far has been that it
 lists build artifacts, and not personal preference (the *.swp entry
 is useless for those who never use vim, for example).

 These paths that depend on your choice of the editor and other tools
 can still be managed in your personal .git/info/exclude in the
 meantime.

Here is a somewhat related question: if one places a file .dir-locals.el
in the top directory of the checkout with the contents:

;;; Directory Local Variables
;;; See Info node `(emacs) Directory Variables' for more information.

((c-mode
  (c-default-style . linux)
  (indent-tabs-mode . t)))


Then all edits in the whole checkout done with Emacs in C files use the
right indentation style.  Obviously, that's a personal preference
setting in that it is useless for those who never use Emacs (the file
can be written/edited using M-x add-dir-local-variable RET).  It's still
providing significant convenience for a number of users while touching
only a single file.

-- 
David Kastrup

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] .gitignore: Ignore editor backup and swap files

2014-01-16 Thread Duy Nguyen
On Fri, Jan 17, 2014 at 5:43 AM, Jonathan Nieder jrnie...@gmail.com wrote:
 Subject: gitignore doc: add global gitignore to synopsis

 The gitignore(5) manpage already documents $XDG_CONFIG_HOME/git/ignore
 but it is easy to forget that it exists.  Add a reminder to the
 synopsis.

Yes! I knew about the xdg thing but was not aware about
$xdg/git/ignore. No more updating .git/info/exclude on every newly
cloned repo..
-- 
Duy
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html