{"thread":{"id":"35674","subject":"[PATCH] .gitignore: Ignore editor backup and swap files","startedAt":"2014-01-16T21:19:24Z","lastAt":"2014-01-17T06:20:55Z","messageCount":7,"participants":["Alexander Berntsen","Junio C Hamano","Jonathan Nieder","Ramsay Jones","David Kastrup","Duy Nguyen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"233228","messageId":"1389907164-13400-1-git-send-email-alexander@plaimi.net","threadId":"35674","inReplyTo":null,"subject":"[PATCH] .gitignore: Ignore editor backup and swap files","fromName":"Alexander Berntsen","fromEmail":"alexander@plaimi.net","sentAt":"2014-01-16T21:19:24Z","receivedAt":"2014-01-16T21:19:24Z","isPatch":true,"sender":{"key":"alexander@plaimi.net","avatar":null},"body":"Signed-off-by: Alexander Berntsen <alexander@plaimi.net>\n---\n .gitignore | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/.gitignore b/.gitignore\nindex b5f9def..2905c21 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -240,3 +240,5 @@\n *.pdb\n /Debug/\n /Release/\n+*~\n+.*.swp\n-- \n1.8.3.2\n"},{"id":"233230","messageId":"xmqqtxd3y43b.fsf@gitster.dls.corp.google.com","threadId":"35674","inReplyTo":"1389907164-13400-1-git-send-email-alexander@plaimi.net","subject":"Re: [PATCH] .gitignore: Ignore editor backup and swap files","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-01-16T22:06:00Z","receivedAt":"2014-01-16T22:06:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexander Berntsen <alexander@plaimi.net> writes:\n\n> Signed-off-by: Alexander Berntsen <alexander@plaimi.net>\n> ---\n>  .gitignore | 2 ++\n>  1 file changed, 2 insertions(+)\n>\n> diff --git a/.gitignore b/.gitignore\n> index b5f9def..2905c21 100644\n> --- a/.gitignore\n> +++ b/.gitignore\n> @@ -240,3 +240,5 @@\n>  *.pdb\n>  /Debug/\n>  /Release/\n> +*~\n> +.*.swp\n\nI personally do not mind listing these common ones too much, but if\nI am not mistaken, our policy on this file so far has been that it\nlists build artifacts, and not personal preference (the *.swp entry\nis useless for those who never use vim, for example).\n\nThese paths that depend on your choice of the editor and other tools\ncan still be managed in your personal .git/info/exclude in the\nmeantime.\n"},{"id":"233232","messageId":"52D85A1F.1010702@plaimi.net","threadId":"35674","inReplyTo":"xmqqtxd3y43b.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] .gitignore: Ignore editor backup and swap files","fromName":"Alexander Berntsen","fromEmail":"alexander@plaimi.net","sentAt":"2014-01-16T22:15:59Z","receivedAt":"2014-01-16T22:15:59Z","isPatch":true,"sender":{"key":"alexander@plaimi.net","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA256\n\nOn 16/01/14 23:06, Junio C Hamano wrote:\n> I personally do not mind listing these common ones too much, but if\n> I am not mistaken, our policy on this file so far has been that it\n>  lists build artifacts, and not personal preference (the *.swp\n> entry is useless for those who never use vim, for example).\nI don't see any downside to having this in .gitignore. However, not\nincluding it doesn't significantly impede my workflow either. I will\nnot argue ferociously for this patch's inclusion. :-)\n\n- -- \nAlexander\nalexander@plaimi.net\nhttp://plaimi.net/~alexander\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v2.0.22 (GNU/Linux)\nComment: Using GnuPG with Thunderbird - http://www.enigmail.net/\n\niF4EAREIAAYFAlLYWh8ACgkQRtClrXBQc7X7WAD9GTUId4ipGdL334Oo6Yn9duSA\nqixEG95nJ2FsGz5/KNsA/icUkn2BYZRCHevsnYyUFkinOiApckkqpMOTAk5Wsd4D\n=7Fvb\n-----END PGP SIGNATURE-----\n"},{"id":"233235","messageId":"20140116224334.GS18964@google.com","threadId":"35674","inReplyTo":"xmqqtxd3y43b.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] .gitignore: Ignore editor backup and swap files","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2014-01-16T22:43:34Z","receivedAt":"2014-01-16T22:43:34Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n> These paths that depend on your choice of the editor and other tools\n> can still be managed in your personal .git/info/exclude in the\n> meantime.\n\nOr $HOME/.config/git/ignore to not have to make the same setting\nin every repository. :)\n\nMaybe it would make sense to add a hint about that somewhere to\nuser-manual.txt.  Even better would be to automatically include some\ncommon exclude patterns globally without requiring any manual\nconfiguration, but that would take some care to make sure the patterns\nand how to disable them are documented clearly.\n\n-- >8 --\nSubject: gitignore doc: add global gitignore to synopsis\n\nThe gitignore(5) manpage already documents $XDG_CONFIG_HOME/git/ignore\nbut it is easy to forget that it exists.  Add a reminder to the\nsynopsis.\n\nNoticed while looking for a place to put a list of scratch filenames\nin the cwd used by one's editor of choice.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n Documentation/gitignore.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt\nindex f971960..37c9470 100644\n--- a/Documentation/gitignore.txt\n+++ b/Documentation/gitignore.txt\n@@ -7,7 +7,7 @@ gitignore - Specifies intentionally untracked files to ignore\n \n SYNOPSIS\n --------\n-$GIT_DIR/info/exclude, .gitignore\n+$HOME/.config/git/ignore, $GIT_DIR/info/exclude, .gitignore\n \n DESCRIPTION\n -----------\n-- \n1.8.5.2\n"},{"id":"233236","messageId":"52D863AF.30506@ramsay1.demon.co.uk","threadId":"35674","inReplyTo":"xmqqtxd3y43b.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] .gitignore: Ignore editor backup and swap files","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2014-01-16T22:56:47Z","receivedAt":"2014-01-16T22:56:47Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"On 16/01/14 22:06, Junio C Hamano wrote:\n> Alexander Berntsen <alexander@plaimi.net> writes:\n> \n>> Signed-off-by: Alexander Berntsen <alexander@plaimi.net>\n>> ---\n>>  .gitignore | 2 ++\n>>  1 file changed, 2 insertions(+)\n>>\n>> diff --git a/.gitignore b/.gitignore\n>> index b5f9def..2905c21 100644\n>> --- a/.gitignore\n>> +++ b/.gitignore\n>> @@ -240,3 +240,5 @@\n>>  *.pdb\n>>  /Debug/\n>>  /Release/\n>> +*~\n>> +.*.swp\n> \n> I personally do not mind listing these common ones too much, but if\n> I am not mistaken, our policy on this file so far has been that it\n> lists build artifacts, and not personal preference (the *.swp entry\n> is useless for those who never use vim, for example).\n> \n> These paths that depend on your choice of the editor and other tools\n> can still be managed in your personal .git/info/exclude in the\n> meantime.\n\nAs a vim user, I have these set in my ~/.gitignore file, which I refer\nto from ~/.gitconfig using core.excludesfile. ;-)\n\n\nATB,\nRamsay Jones\n"},{"id":"233265","messageId":"87fvonz008.fsf@fencepost.gnu.org","threadId":"35674","inReplyTo":"xmqqtxd3y43b.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] .gitignore: Ignore editor backup and swap files","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2014-01-17T04:48:55Z","receivedAt":"2014-01-17T04:48:55Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Alexander Berntsen <alexander@plaimi.net> writes:\n>\n>> Signed-off-by: Alexander Berntsen <alexander@plaimi.net>\n>> ---\n>>  .gitignore | 2 ++\n>>  1 file changed, 2 insertions(+)\n>>\n>> diff --git a/.gitignore b/.gitignore\n>> index b5f9def..2905c21 100644\n>> --- a/.gitignore\n>> +++ b/.gitignore\n>> @@ -240,3 +240,5 @@\n>>  *.pdb\n>>  /Debug/\n>>  /Release/\n>> +*~\n>> +.*.swp\n>\n> I personally do not mind listing these common ones too much, but if\n> I am not mistaken, our policy on this file so far has been that it\n> lists build artifacts, and not personal preference (the *.swp entry\n> is useless for those who never use vim, for example).\n>\n> These paths that depend on your choice of the editor and other tools\n> can still be managed in your personal .git/info/exclude in the\n> meantime.\n\nHere is a somewhat related question: if one places a file .dir-locals.el\nin the top directory of the checkout with the contents:\n\n;;; Directory Local Variables\n;;; See Info node `(emacs) Directory Variables' for more information.\n\n((c-mode\n  (c-default-style . \"linux\")\n  (indent-tabs-mode . t)))\n\n\nThen all edits in the whole checkout done with Emacs in C files use the\nright indentation style.  Obviously, that's a \"personal preference\"\nsetting in that it is useless for those who never use Emacs (the file\ncan be written/edited using M-x add-dir-local-variable RET).  It's still\nproviding significant convenience for a number of users while touching\nonly a single file.\n\n-- \nDavid Kastrup\n"},{"id":"233266","messageId":"CACsJy8DcrR0Rgp0cE+Va2ZBfvtvEJiFxkoXMrkwPj9bn621m9Q@mail.gmail.com","threadId":"35674","inReplyTo":"20140116224334.GS18964@google.com","subject":"Re: [PATCH] .gitignore: Ignore editor backup and swap files","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-01-17T06:20:55Z","receivedAt":"2014-01-17T06:20:55Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Fri, Jan 17, 2014 at 5:43 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Subject: gitignore doc: add global gitignore to synopsis\n>\n> The gitignore(5) manpage already documents $XDG_CONFIG_HOME/git/ignore\n> but it is easy to forget that it exists.  Add a reminder to the\n> synopsis.\n\nYes! I knew about the xdg thing but was not aware about\n$xdg/git/ignore. No more updating .git/info/exclude on every newly\ncloned repo..\n-- \nDuy\n"}]}