{"thread":{"id":"11990","subject":"[PATCH] Add gitattributes file making whitespace checking pickier","startedAt":"2008-02-09T16:22:35Z","lastAt":"2008-02-12T21:42:15Z","messageCount":22,"participants":["J. Bruce Fields","Daniel Barkalow","Jakub Narebski","Junio C Hamano","Brian Downing"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"68095","messageId":"20080209162234.GA25533@fieldses.org","threadId":"11990","inReplyTo":null,"subject":"[PATCH] Add gitattributes file making whitespace checking pickier","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2008-02-09T16:22:35Z","receivedAt":"2008-02-09T16:22:35Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"From: J. Bruce Fields <bfields@citi.umich.edu>\n\nThis will change the notion of \"bad\" whitespace for the git project to\ninclude initial whitespace that uses spaces where tabs could have been\nused.\n\nThis only changes which whitespace is considered \"bad\".  It doesn't\nchange the behavior when bad whitespace is found.  By default, commands\nlike git-apply, git-am, and git-rebase will print a warning but\notherwise do nothing.\n---\n .gitattributes |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 .gitattributes\n\nIs there any reason not to use this now that we have it?\n\ndiff --git a/.gitattributes b/.gitattributes\nnew file mode 100644\nindex 0000000..dd65501\n--- /dev/null\n+++ b/.gitattributes\n@@ -0,0 +1 @@\n+* whitespace\n-- \n1.5.4.rc2.60.gb2e62\n"},{"id":"68107","messageId":"alpine.LNX.1.00.0802091251430.13593@iabervon.org","threadId":"11990","inReplyTo":"20080209162234.GA25533@fieldses.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-02-09T17:56:16Z","receivedAt":"2008-02-09T17:56:16Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Sat, 9 Feb 2008, J. Bruce Fields wrote:\n\n> From: J. Bruce Fields <bfields@citi.umich.edu>\n> \n> This will change the notion of \"bad\" whitespace for the git project to\n> include initial whitespace that uses spaces where tabs could have been\n> used.\n> \n> This only changes which whitespace is considered \"bad\".  It doesn't\n> change the behavior when bad whitespace is found.  By default, commands\n> like git-apply, git-am, and git-rebase will print a warning but\n> otherwise do nothing.\n\nI think there are files under t/ with different whitespace rules. For \nexample, expected format-patch output will have lines that are: \"-- \"\nWhile you're putting in attributes in general, it'd be nice to take care \nof all of the cases already in the tree.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"68110","messageId":"20080209185038.GB25533@fieldses.org","threadId":"11990","inReplyTo":"alpine.LNX.1.00.0802091251430.13593@iabervon.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2008-02-09T18:50:38Z","receivedAt":"2008-02-09T18:50:38Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Sat, Feb 09, 2008 at 12:56:16PM -0500, Daniel Barkalow wrote:\n> On Sat, 9 Feb 2008, J. Bruce Fields wrote:\n> \n> > From: J. Bruce Fields <bfields@citi.umich.edu>\n> > \n> > This will change the notion of \"bad\" whitespace for the git project to\n> > include initial whitespace that uses spaces where tabs could have been\n> > used.\n> > \n> > This only changes which whitespace is considered \"bad\".  It doesn't\n> > change the behavior when bad whitespace is found.  By default, commands\n> > like git-apply, git-am, and git-rebase will print a warning but\n> > otherwise do nothing.\n> \n> I think there are files under t/ with different whitespace rules. For \n> example, expected format-patch output will have lines that are: \"-- \"\n\nWell, this change doesn't actually affect that case.\n\n> While you're putting in attributes in general, it'd be nice to take care \n> of all of the cases already in the tree.\n\nYeah, fair enough.  Hard to know where to start, though.  OK, just to\nget an idea, I committed a completely empty tree, made a diff (with\n--binary), then applied with --whitespace=fix and compared to the\noriginal.  In some cases these seem to be accidental, in some cases\n(git-p4) I assume they're intended to use the different style.\n\n--b.\n\n COPYING                                                                 |    2 \n Documentation/RelNotes-1.5.3.8.txt                                      |    1 \n Documentation/SubmittingPatches                                         |   30 \n Documentation/callouts.xsl                                              |    2 \n Documentation/config.txt                                                |    2 \n Documentation/core-tutorial.txt                                         |   56 \n Documentation/diff-format.txt                                           |    8 \n Documentation/everyday.txt                                              |   20 \n Documentation/git-add.txt                                               |   14 \n Documentation/git-am.txt                                                |    6 \n Documentation/git-archimport.txt                                        |    2 \n Documentation/git-bisect.txt                                            |    6 \n Documentation/git-blame.txt                                             |    4 \n Documentation/git-cherry.txt                                            |   12 \n Documentation/git-cvsimport.txt                                         |    4 \n Documentation/git-cvsserver.txt                                         |   10 \n Documentation/git-daemon.txt                                            |   10 \n Documentation/git-diff-tree.txt                                         |    2 \n Documentation/git-for-each-ref.txt                                      |    4 \n Documentation/git-format-patch.txt                                      |   22 \n Documentation/git-http-fetch.txt                                        |    8 \n Documentation/git-index-pack.txt                                        |    2 \n Documentation/git-instaweb.txt                                          |    2 \n Documentation/git-ls-files.txt                                          |    2 \n Documentation/git-ls-tree.txt                                           |    4 \n Documentation/git-mv.txt                                                |    6 \n Documentation/git-pack-objects.txt                                      |    4 \n Documentation/git-prune-packed.txt                                      |    4 \n Documentation/git-push.txt                                              |    2 \n Documentation/git-read-tree.txt                                         |   14 \n Documentation/git-rebase.txt                                            |   56 \n Documentation/git-repack.txt                                            |   10 \n Documentation/git-rerere.txt                                            |   20 \n Documentation/git-rev-parse.txt                                         |   14 \n Documentation/git-rm.txt                                                |    8 \n Documentation/git-send-email.txt                                        |   14 \n Documentation/git-show-branch.txt                                       |    8 \n Documentation/git-stash.txt                                             |    4 \n Documentation/git-unpack-objects.txt                                    |    2 \n Documentation/git-update-index.txt                                      |   18 \n Documentation/git.txt                                                   |    4 \n Documentation/howto/maintain-git.txt                                    |   14 \n Documentation/howto/rebase-from-internal-branch.txt                     |   20 \n Documentation/howto/rebuild-from-update-hook.txt                        |    4 \n Documentation/howto/revert-branch-rebase.txt                            |    2 \n Documentation/howto/separating-topic-branches.txt                       |   86 \n Documentation/howto/update-hook-example.txt                             |   56 \n Documentation/rev-list-options.txt                                      |   10 \n Documentation/technical/pack-format.txt                                 |   16 \n Documentation/technical/pack-heuristics.txt                             |  340 -\n Documentation/technical/send-pack-pipeline.txt                          |    8 \n Documentation/user-manual.txt                                           |  130 \n GIT-VERSION-GEN                                                         |    2 \n INSTALL                                                                 |    4 \n Makefile                                                                |    7 \n archive-tar.c                                                           |   18 \n archive-zip.c                                                           |   12 \n archive.c                                                               |   17 \n blob.c                                                                  |   24 \n builtin-add.c                                                           |    4 \n builtin-apply.c                                                         |    6 \n builtin-fetch-pack.c                                                    |    2 \n builtin-fetch.c                                                         |    4 \n builtin-for-each-ref.c                                                  |   10 \n builtin-fsck.c                                                          |    4 \n builtin-init-db.c                                                       |    2 \n builtin-log.c                                                           |    2 \n builtin-ls-tree.c                                                       |    6 \n builtin-pack-objects.c                                                  |    8 \n builtin-rev-parse.c                                                     |    4 \n cache-tree.c                                                            |    2 \n commit.h                                                                |    8 \n compat/inet_pton.c                                                      |  242 \n compat/memmem.c                                                         |    2 \n compat/pread.c                                                          |   18 \n compat/unsetenv.c                                                       |    2 \n configure.ac                                                            |    4 \n contrib/completion/git-completion.bash                                  |    4 \n contrib/emacs/git-blame.el                                              |  194 \n contrib/emacs/git.el                                                    |  678 +-\n contrib/emacs/vc-git.el                                                 |   58 \n contrib/examples/git-commit.sh                                          |    2 \n contrib/examples/git-fetch.sh                                           |    2 \n contrib/examples/git-svnimport.txt                                      |    6 \n contrib/examples/git-tag.sh                                             |   16 \n contrib/fast-import/git-p4                                              | 2718 +++++-----\n contrib/fast-import/git-p4.txt                                          |    1 \n contrib/gitview/gitview                                                 |    6 \n contrib/hg-to-git/hg-to-git.py                                          |  110 \n contrib/hg-to-git/hg-to-git.txt                                         |    4 \n contrib/p4import/git-p4import.py                                        |  358 -\n contrib/p4import/git-p4import.txt                                       |   12 \n contrib/stats/mailmap.pl                                                |    1 \n contrib/stats/packinfo.pl                                               |   58 \n convert.c                                                               |   10 \n diff.h                                                                  |    2 \n fast-import.c                                                           |   18 \n generate-cmdlist.sh                                                     |    4 \n git-add--interactive.perl                                               |    4 \n git-am.sh                                                               |    8 \n git-archimport.perl                                                     |  702 +-\n git-bisect.sh                                                           |   36 \n git-compat-util.h                                                       |    2 \n git-cvsexportcommit.perl                                                |   14 \n git-cvsimport.perl                                                      |   24 \n git-cvsserver.perl                                                      | 2346 ++++----\n git-filter-branch.sh                                                    |    2 \n git-gui/po/fr.po                                                        |    1 \n git-gui/po/glossary/fr.po                                               |    1 \n git-gui/po/glossary/git-gui-glossary.pot                                |    1 \n git-gui/po/it.po                                                        |    4 \n git-gui/po/sv.po                                                        |    1 \n git-help--browse.sh                                                     |    2 \n git-merge.sh                                                            |   18 \n git-mergetool.sh                                                        |   36 \n git-parse-remote.sh                                                     |    2 \n git-rebase.sh                                                           |    2 \n git-remote.perl                                                         |    4 \n git-send-email.perl                                                     |   26 \n git-svn.perl                                                            |  336 -\n gitk-git/Makefile                                                       |    1 \n gitk-git/gitk                                                           |   52 \n gitweb/gitweb.perl                                                      |  566 +-\n index-pack.c                                                            |   30 \n object.c                                                                |    8 \n parse-options.c                                                         |   12 \n parse-options.h                                                         |    6 \n patch-ids.c                                                             |    2 \n perl/Git.pm                                                             |   10 \n perl/private-Error.pm                                                   |   40 \n ppc/sha1ppc.S                                                           |    2 \n pretty.c                                                                |   24 \n quote.c                                                                 |    4 \n quote.h                                                                 |    2 \n refs.c                                                                  |    2 \n remote.c                                                                |    4 \n revision.c                                                              |    4 \n sha1_file.c                                                             |   10 \n strbuf.c                                                                |    2 \n strbuf.h                                                                |    2 \n t/lib-read-tree-m-3way.sh                                               |    4 \n t/t0040-parse-options.sh                                                |    2 \n t/t1000-read-tree-m-3way.sh                                             |   12 \n t/t1001-read-tree-m-2way.sh                                             |   10 \n t/t1300-repo-config.sh                                                  |    2 \n t/t3040-subprojects-basic.sh                                            |    2 \n t/t3200-branch.sh                                                       |   30 \n t/t3600-rm.sh                                                           |    4 \n t/t4010-diff-pathspec.sh                                                |    4 \n t/t4013/diff.format-patch_--stdout_initial..master                      |    6 \n t/t4013/diff.format-patch_--stdout_initial..master^                     |    4 \n t/t4013/diff.format-patch_--stdout_initial..side                        |    2 \n t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_             |    2 \n t/t4013/diff.log_--patch-with-stat_master                               |    2 \n t/t4013/diff.log_--patch-with-stat_master_--_dir_                       |    2 \n t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master         |    2 \n t/t4013/diff.log_--root_--patch-with-stat_--summary_master              |    2 \n t/t4013/diff.log_--root_--patch-with-stat_master                        |    2 \n t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master           |    2 \n t/t4013/diff.log_--root_-p_master                                       |    2 \n t/t4013/diff.log_--root_master                                          |    2 \n t/t4013/diff.log_-p_master                                              |    2 \n t/t4013/diff.log_master                                                 |    2 \n t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_     |    2 \n t/t4013/diff.whatchanged_--patch-with-stat_master                       |    2 \n t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_               |    2 \n t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master |    2 \n t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master      |    2 \n t/t4013/diff.whatchanged_--root_--patch-with-stat_master                |    2 \n t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master   |    2 \n t/t4013/diff.whatchanged_--root_-p_master                               |    2 \n t/t4013/diff.whatchanged_--root_master                                  |    2 \n t/t4013/diff.whatchanged_-p_master                                      |    2 \n t/t4013/diff.whatchanged_master                                         |    2 \n t/t4015-diff-whitespace.sh                                              |    4 \n t/t4016-diff-quote.sh                                                   |   14 \n t/t4021-format-patch-signer-mime.sh                                     |    1 \n t/t4022-diff-rewrite.sh                                                 |    1 \n t/t4100/t-apply-1.patch                                                 |  156 \n t/t4100/t-apply-2.patch                                                 |   16 \n t/t4100/t-apply-3.expect                                                |    6 \n t/t4100/t-apply-3.patch                                                 |   60 \n t/t4100/t-apply-4.expect                                                |    4 \n t/t4100/t-apply-5.patch                                                 |   58 \n t/t4100/t-apply-6.patch                                                 |   14 \n t/t4100/t-apply-7.expect                                                |    6 \n t/t4100/t-apply-7.patch                                                 |  136 \n t/t4101-apply-nonl.sh                                                   |    2 \n t/t4109-apply-multifrag.sh                                              |   63 \n t/t4119-apply-config.sh                                                 |    2 \n t/t4201-shortlog.sh                                                     |    8 \n t/t5100/info0001                                                        |    1 \n t/t5100/info0002                                                        |    1 \n t/t5100/info0003                                                        |    1 \n t/t5100/info0004                                                        |    1 \n t/t5100/info0005                                                        |    1 \n t/t5100/info0006                                                        |    1 \n t/t5100/info0007                                                        |    1 \n t/t5100/info0008                                                        |    1 \n t/t5100/msg0001                                                         |    1 \n t/t5100/msg0002                                                         |    5 \n t/t5100/msg0003                                                         |    1 \n t/t5100/msg0004                                                         |    1 \n t/t5100/msg0006                                                         |    1 \n t/t5100/msg0007                                                         |    1 \n t/t5100/msg0008                                                         |    1 \n t/t5100/patch0001                                                       |    3 \n t/t5100/patch0002                                                       |    3 \n t/t5100/patch0003                                                       |    3 \n t/t5100/patch0004                                                       |   28 \n t/t5100/patch0005                                                       |   50 \n t/t5100/patch0006                                                       |    3 \n t/t5100/sample.mbox                                                     |   82 \n t/t5300-pack-object.sh                                                  |    6 \n t/t5301-sliding-window.sh                                               |    6 \n t/t5302-pack-index.sh                                                   |    6 \n t/t5400-send-pack.sh                                                    |    6 \n t/t5402-post-merge-hook.sh                                              |   12 \n t/t5403-post-checkout-hook.sh                                           |   52 \n t/t6000lib.sh                                                           |   16 \n t/t6002-rev-list-bisect.sh                                              |    2 \n t/t6005-rev-list-count.sh                                               |    6 \n t/t6030-bisect-porcelain.sh                                             |   10 \n t/t6120-describe.sh                                                     |    8 \n t/t7002-grep.sh                                                         |    2 \n t/t7003-filter-branch.sh                                                |    2 \n t/t7500-commit.sh                                                       |    2 \n t/t9100-git-svn-basic.sh                                                |   26 \n t/t9104-git-svn-follow-parent.sh                                        |  108 \n t/t9107-git-svn-migrate.sh                                              |   16 \n t/t9108-git-svn-glob.sh                                                 |   10 \n t/t9110/svm.dump                                                        |    6 \n t/t9113-git-svn-dcommit-new-file.sh                                     |    6 \n t/t9116-git-svn-log.sh                                                  |    2 \n t/t9118-git-svn-funky-branch-names.sh                                   |    4 \n t/t9400-git-cvsserver-server.sh                                         |    6 \n t/t9500-gitweb-standalone-no-errors.sh                                  |    4 \n tag.c                                                                   |   18 \n test-chmtime.c                                                          |    4 \n transport.c                                                             |    4 \n utf8.c                                                                  |    4 \n wt-status.c                                                             |    4 \n xdiff/xemit.c                                                           |    2 \n 243 files changed, 5666 insertions(+), 5702 deletions(-)\n"},{"id":"68111","messageId":"20080209190533.GD25533@fieldses.org","threadId":"11990","inReplyTo":"20080209185038.GB25533@fieldses.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2008-02-09T19:05:33Z","receivedAt":"2008-02-09T19:05:33Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Sat, Feb 09, 2008 at 01:50:38PM -0500, bfields wrote:\n> On Sat, Feb 09, 2008 at 12:56:16PM -0500, Daniel Barkalow wrote:\n> > On Sat, 9 Feb 2008, J. Bruce Fields wrote:\n> > \n> > > From: J. Bruce Fields <bfields@citi.umich.edu>\n> > > \n> > > This will change the notion of \"bad\" whitespace for the git project to\n> > > include initial whitespace that uses spaces where tabs could have been\n> > > used.\n> > > \n> > > This only changes which whitespace is considered \"bad\".  It doesn't\n> > > change the behavior when bad whitespace is found.  By default, commands\n> > > like git-apply, git-am, and git-rebase will print a warning but\n> > > otherwise do nothing.\n> > \n> > I think there are files under t/ with different whitespace rules. For \n> > example, expected format-patch output will have lines that are: \"-- \"\n> \n> Well, this change doesn't actually affect that case.\n> \n> > While you're putting in attributes in general, it'd be nice to take care \n> > of all of the cases already in the tree.\n> \n> Yeah, fair enough.  Hard to know where to start, though.  OK, just to\n> get an idea, I committed a completely empty tree, made a diff (with\n> --binary), then applied with --whitespace=fix and compared to the\n> original.  In some cases these seem to be accidental, in some cases\n> (git-p4) I assume they're intended to use the different style.\n\nOr the below is just the difference between a tree with the default\nwhitespace style and one with the initial spaces also changed to tabs\nwhere possible.  (Ignore the spurious change in .gitattributes.)\n\nI'd be inclined to take the lazy approach, defaulting to the more\naggressive checks and then letting people send in the exceptions when\nthey get annoyed, but perhaps that's unhelpful.\n\n--b.\n\n .gitattributes                                      |    1 \n COPYING                                             |    2 \n Documentation/SubmittingPatches                     |   30 \n Documentation/callouts.xsl                          |    2 \n Documentation/config.txt                            |    2 \n Documentation/core-tutorial.txt                     |   56 \n Documentation/diff-format.txt                       |    8 \n Documentation/everyday.txt                          |   20 \n Documentation/git-add.txt                           |   14 \n Documentation/git-am.txt                            |    6 \n Documentation/git-archimport.txt                    |    2 \n Documentation/git-bisect.txt                        |    6 \n Documentation/git-blame.txt                         |    4 \n Documentation/git-cherry.txt                        |   12 \n Documentation/git-cvsimport.txt                     |    4 \n Documentation/git-cvsserver.txt                     |   10 \n Documentation/git-daemon.txt                        |   10 \n Documentation/git-diff-tree.txt                     |    2 \n Documentation/git-for-each-ref.txt                  |    4 \n Documentation/git-format-patch.txt                  |   22 \n Documentation/git-http-fetch.txt                    |    8 \n Documentation/git-index-pack.txt                    |    2 \n Documentation/git-instaweb.txt                      |    2 \n Documentation/git-ls-files.txt                      |    2 \n Documentation/git-ls-tree.txt                       |    4 \n Documentation/git-mv.txt                            |    6 \n Documentation/git-pack-objects.txt                  |    4 \n Documentation/git-prune-packed.txt                  |    4 \n Documentation/git-push.txt                          |    2 \n Documentation/git-read-tree.txt                     |   14 \n Documentation/git-rebase.txt                        |   56 \n Documentation/git-repack.txt                        |   10 \n Documentation/git-rerere.txt                        |   20 \n Documentation/git-rev-parse.txt                     |   12 \n Documentation/git-rm.txt                            |    8 \n Documentation/git-send-email.txt                    |   14 \n Documentation/git-show-branch.txt                   |    8 \n Documentation/git-stash.txt                         |    4 \n Documentation/git-unpack-objects.txt                |    2 \n Documentation/git-update-index.txt                  |   18 \n Documentation/git.txt                               |    4 \n Documentation/howto/maintain-git.txt                |   14 \n Documentation/howto/rebase-from-internal-branch.txt |   20 \n Documentation/howto/rebuild-from-update-hook.txt    |    4 \n Documentation/howto/revert-branch-rebase.txt        |    2 \n Documentation/howto/separating-topic-branches.txt   |   86 \n Documentation/howto/update-hook-example.txt         |   56 \n Documentation/rev-list-options.txt                  |   10 \n Documentation/technical/pack-format.txt             |   16 \n Documentation/technical/pack-heuristics.txt         |  340 +-\n Documentation/technical/send-pack-pipeline.txt      |    8 \n Documentation/user-manual.txt                       |  122 \n INSTALL                                             |    4 \n Makefile                                            |    6 \n archive-tar.c                                       |   18 \n archive-zip.c                                       |   12 \n archive.c                                           |   16 \n blob.c                                              |   24 \n builtin-add.c                                       |    4 \n builtin-apply.c                                     |    6 \n builtin-fetch-pack.c                                |    2 \n builtin-fetch.c                                     |    4 \n builtin-for-each-ref.c                              |   10 \n builtin-fsck.c                                      |    4 \n builtin-init-db.c                                   |    2 \n builtin-log.c                                       |    2 \n builtin-ls-tree.c                                   |    6 \n builtin-pack-objects.c                              |    8 \n builtin-rev-parse.c                                 |    4 \n cache-tree.c                                        |    2 \n commit.h                                            |    8 \n compat/inet_pton.c                                  |  242 -\n compat/memmem.c                                     |    2 \n compat/pread.c                                      |   18 \n compat/unsetenv.c                                   |    2 \n configure.ac                                        |    4 \n contrib/completion/git-completion.bash              |    4 \n contrib/emacs/git-blame.el                          |  194 -\n contrib/emacs/git.el                                |  678 ++--\n contrib/emacs/vc-git.el                             |   58 \n contrib/examples/git-commit.sh                      |    2 \n contrib/examples/git-fetch.sh                       |    2 \n contrib/examples/git-svnimport.txt                  |    6 \n contrib/examples/git-tag.sh                         |   16 \n contrib/fast-import/git-p4                          | 2718 ++++++++++----------\n contrib/gitview/gitview                             |    6 \n contrib/hg-to-git/hg-to-git.py                      |  110 \n contrib/hg-to-git/hg-to-git.txt                     |    4 \n contrib/p4import/git-p4import.py                    |  358 +-\n contrib/p4import/git-p4import.txt                   |   12 \n contrib/stats/packinfo.pl                           |   58 \n convert.c                                           |   10 \n diff.h                                              |    2 \n fast-import.c                                       |   18 \n generate-cmdlist.sh                                 |    4 \n git-add--interactive.perl                           |    4 \n git-am.sh                                           |    8 \n git-archimport.perl                                 |  702 ++---\n git-bisect.sh                                       |   36 \n git-compat-util.h                                   |    2 \n git-cvsexportcommit.perl                            |   14 \n git-cvsimport.perl                                  |   24 \n git-cvsserver.perl                                  | 2346 ++++++++---------\n git-filter-branch.sh                                |    2 \n git-help--browse.sh                                 |    2 \n git-merge.sh                                        |   18 \n git-mergetool.sh                                    |   36 \n git-parse-remote.sh                                 |    2 \n git-rebase.sh                                       |    2 \n git-remote.perl                                     |    4 \n git-send-email.perl                                 |   26 \n git-svn.perl                                        |  336 +-\n gitk-git/gitk                                       |   44 \n gitweb/gitweb.perl                                  |  566 ++--\n index-pack.c                                        |   30 \n object.c                                            |    8 \n parse-options.c                                     |   12 \n parse-options.h                                     |    6 \n patch-ids.c                                         |    2 \n perl/Git.pm                                         |   10 \n perl/private-Error.pm                               |   40 \n ppc/sha1ppc.S                                       |    2 \n pretty.c                                            |   24 \n quote.c                                             |    4 \n quote.h                                             |    2 \n refs.c                                              |    2 \n remote.c                                            |    4 \n revision.c                                          |    4 \n sha1_file.c                                         |   10 \n strbuf.c                                            |    2 \n strbuf.h                                            |    2 \n t/lib-read-tree-m-3way.sh                           |    4 \n t/t0040-parse-options.sh                            |    2 \n t/t1000-read-tree-m-3way.sh                         |   12 \n t/t1001-read-tree-m-2way.sh                         |   10 \n t/t1300-repo-config.sh                              |    2 \n t/t3040-subprojects-basic.sh                        |    2 \n t/t3200-branch.sh                                   |   30 \n t/t3600-rm.sh                                       |    4 \n t/t4010-diff-pathspec.sh                            |    4 \n t/t4100/t-apply-1.patch                             |   10 \n t/t4101-apply-nonl.sh                               |    2 \n t/t4201-shortlog.sh                                 |    8 \n t/t5300-pack-object.sh                              |    6 \n t/t5301-sliding-window.sh                           |    6 \n t/t5302-pack-index.sh                               |    6 \n t/t5400-send-pack.sh                                |    6 \n t/t5402-post-merge-hook.sh                          |   12 \n t/t5403-post-checkout-hook.sh                       |   52 \n t/t6000lib.sh                                       |   16 \n t/t6002-rev-list-bisect.sh                          |    2 \n t/t6005-rev-list-count.sh                           |    6 \n t/t6030-bisect-porcelain.sh                         |   10 \n t/t6120-describe.sh                                 |    8 \n t/t7002-grep.sh                                     |    2 \n t/t7003-filter-branch.sh                            |    2 \n t/t7500-commit.sh                                   |    2 \n t/t9100-git-svn-basic.sh                            |   26 \n t/t9104-git-svn-follow-parent.sh                    |  108 \n t/t9107-git-svn-migrate.sh                          |   16 \n t/t9108-git-svn-glob.sh                             |   10 \n t/t9113-git-svn-dcommit-new-file.sh                 |    6 \n t/t9116-git-svn-log.sh                              |    2 \n t/t9118-git-svn-funky-branch-names.sh               |    4 \n t/t9400-git-cvsserver-server.sh                     |    6 \n t/t9500-gitweb-standalone-no-errors.sh              |    4 \n tag.c                                               |   18 \n test-chmtime.c                                      |    4 \n transport.c                                         |    4 \n utf8.c                                              |    4 \n wt-status.c                                         |    4 \n xdiff/xemit.c                                       |    2 \n 172 files changed, 5276 insertions(+), 5275 deletions(-)\n"},{"id":"68112","messageId":"m3abm9hqix.fsf@localhost.localdomain","threadId":"11990","inReplyTo":"20080209190533.GD25533@fieldses.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-09T19:36:31Z","receivedAt":"2008-02-09T19:36:31Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"J. Bruce Fields\" <bfields@fieldses.org> writes:\n\n>  gitweb/gitweb.perl                                  |  566 ++--\n>  index-pack.c                                        |   30 \n\ngitweb (at my insistence) uses tabs for indent, but spaces for align,\nso that the layout is [roughly] preserved independently of the tab\nsize. IMHO it is superior style, but much harder to check\nalgorithmically (although I send some sketch of idea how to check that\nat least for aligned commands). That is why there is such a big change.\n\nI'd rather have real bugfixes, real documentation improvements, new\nfeatures instead of such bikeshedding.  If someone is making a change\nsomewhere, he/she can fix the whitespace in the neighbourhood.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"68114","messageId":"20080209200435.GA8919@fieldses.org","threadId":"11990","inReplyTo":"m3abm9hqix.fsf@localhost.localdomain","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2008-02-09T20:04:35Z","receivedAt":"2008-02-09T20:04:35Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Sat, Feb 09, 2008 at 11:36:31AM -0800, Jakub Narebski wrote:\n> \"J. Bruce Fields\" <bfields@fieldses.org> writes:\n> \n> >  gitweb/gitweb.perl                                  |  566 ++--\n> >  index-pack.c                                        |   30 \n> \n> gitweb (at my insistence) uses tabs for indent, but spaces for align,\n> so that the layout is [roughly] preserved independently of the tab\n> size. IMHO it is superior style, but much harder to check\n> algorithmically (although I send some sketch of idea how to check that\n> at least for aligned commands). That is why there is such a big change.\n> \n> I'd rather have real bugfixes, real documentation improvements, new\n> features instead of such bikeshedding.  If someone is making a change\n> somewhere, he/she can fix the whitespace in the neighbourhood.\n\nI agree completely.  Did I suggest otherwise?\n\n--b.\n"},{"id":"68119","messageId":"200802092122.01656.jnareb@gmail.com","threadId":"11990","inReplyTo":"20080209200435.GA8919@fieldses.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-09T20:22:00Z","receivedAt":"2008-02-09T20:22:00Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"J. Bruce Fields wrote:\n> On Sat, Feb 09, 2008 at 11:36:31AM -0800, Jakub Narebski wrote:\n> > \"J. Bruce Fields\" <bfields@fieldses.org> writes:\n> > \n> > >  gitweb/gitweb.perl                                  |  566 ++--\n> > >  index-pack.c                                        |   30 \n> > \n> > gitweb (at my insistence) uses tabs for indent, but spaces for align,\n> > so that the layout is [roughly] preserved independently of the tab\n> > size. IMHO it is superior style, but much harder to check\n> > algorithmically (although I send some sketch of idea how to check that\n> > at least for aligned commands). That is why there is such a big change.\n> > \n> > I'd rather have real bugfixes, real documentation improvements, new\n> > features instead of such bikeshedding.  If someone is making a change\n> > somewhere, he/she can fix the whitespace in the neighbourhood.\n> \n> I agree completely.  Did I suggest otherwise?\n\nAh, sorry, I have misunderstood.\n\nThis is an informational piece, then, isn't it?\n-- \nJakub Narebski\nPoland\n"},{"id":"68121","messageId":"7vr6fletkl.fsf@gitster.siamese.dyndns.org","threadId":"11990","inReplyTo":"20080209185038.GB25533@fieldses.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-09T20:57:46Z","receivedAt":"2008-02-09T20:57:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"J. Bruce Fields\" <bfields@fieldses.org> writes:\n\n> Yeah, fair enough.  Hard to know where to start, though.  OK, just to\n> get an idea, I committed a completely empty tree, made a diff (with\n> --binary), then applied with --whitespace=fix and compared to the\n> original.  In some cases these seem to be accidental, in some cases\n> (git-p4) I assume they're intended to use the different style.\n\nI personally have this in .git/config\n\n[core]\n\twhitespace = indent,trail,space\n\nand the following three lines in contrib/.gitattributes (untracked)\n\n*.py whitespace=!indent,trail,space\n*.el whitespace=!indent,trail,space\nfast-import/git-p4 whitespace=!indent,trail,space\n\nThe latter I added after receiving a fix-up patch from Toby\nAllsopp a few days ago.  I applied git-p4 patch with the\nstrictest rule.\n\nAs you argued correctly earlier, when we made the whitespace\nrules per-path using the attributes mechanism, the whitespace\npolicy should be project wide, just like coding style, so I\nthink it is a good idea to have in-tree .gitattributes files\nthat spell out what the policy is more explicitly.\n\nAt least I think we can all agree that this one entry in the\ntoplevel .gitattributes is a safe and good idea.\n\n*.[ch] whitespace\n\nI am not sure about the AsciiDoc Documentation.  I've always\nassumed that the docs would format exactly the same before and\nafter running expand and/or unexpand on Documentation/*.txt, and\nif that is indeed the case we should add\n\n*.txt whitespace\n\nto Documentation/.gitattributes as well.\n\nThen I should _discard_ the one in my .git/config and the\nuntracked contrib/.gitattributes file.\n"},{"id":"68131","messageId":"20080209233658.GB20501@fieldses.org","threadId":"11990","inReplyTo":"7vr6fletkl.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2008-02-09T23:36:58Z","receivedAt":"2008-02-09T23:36:58Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Sat, Feb 09, 2008 at 12:57:46PM -0800, Junio C Hamano wrote:\n> \"J. Bruce Fields\" <bfields@fieldses.org> writes:\n> \n> > Yeah, fair enough.  Hard to know where to start, though.  OK, just to\n> > get an idea, I committed a completely empty tree, made a diff (with\n> > --binary), then applied with --whitespace=fix and compared to the\n> > original.  In some cases these seem to be accidental, in some cases\n> > (git-p4) I assume they're intended to use the different style.\n> \n> I personally have this in .git/config\n> \n> [core]\n> \twhitespace = indent,trail,space\n> \n> and the following three lines in contrib/.gitattributes (untracked)\n> \n> *.py whitespace=!indent,trail,space\n> *.el whitespace=!indent,trail,space\n> fast-import/git-p4 whitespace=!indent,trail,space\n> \n> The latter I added after receiving a fix-up patch from Toby\n> Allsopp a few days ago.  I applied git-p4 patch with the\n> strictest rule.\n> \n> As you argued correctly earlier, when we made the whitespace\n> rules per-path using the attributes mechanism, the whitespace\n> policy should be project wide, just like coding style, so I\n> think it is a good idea to have in-tree .gitattributes files\n> that spell out what the policy is more explicitly.\n> \n> At least I think we can all agree that this one entry in the\n> toplevel .gitattributes is a safe and good idea.\n> \n> *.[ch] whitespace\n\nSounds good to me (but so does your configuration above, and if you've\nbeen running with it for a while then it must not to too bad....)\n\n> I am not sure about the AsciiDoc Documentation.  I've always\n> assumed that the docs would format exactly the same before and\n> after running expand and/or unexpand on Documentation/*.txt\n\nThat's what I'd assumed too.\n\n--b.\n\n> , and\n> if that is indeed the case we should add\n> \n> *.txt whitespace\n> \n> to Documentation/.gitattributes as well.\n> \n> Then I should _discard_ the one in my .git/config and the\n> untracked contrib/.gitattributes file.\n"},{"id":"68133","messageId":"20080209233948.GC20501@fieldses.org","threadId":"11990","inReplyTo":"200802092122.01656.jnareb@gmail.com","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2008-02-09T23:39:48Z","receivedAt":"2008-02-09T23:39:48Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Sat, Feb 09, 2008 at 09:22:00PM +0100, Jakub Narebski wrote:\n> J. Bruce Fields wrote:\n> > On Sat, Feb 09, 2008 at 11:36:31AM -0800, Jakub Narebski wrote:\n> > > \"J. Bruce Fields\" <bfields@fieldses.org> writes:\n> > > \n> > > >  gitweb/gitweb.perl                                  |  566 ++--\n> > > >  index-pack.c                                        |   30 \n> > > \n> > > gitweb (at my insistence) uses tabs for indent, but spaces for align,\n> > > so that the layout is [roughly] preserved independently of the tab\n> > > size. IMHO it is superior style, but much harder to check\n> > > algorithmically (although I send some sketch of idea how to check that\n> > > at least for aligned commands). That is why there is such a big change.\n> > > \n> > > I'd rather have real bugfixes, real documentation improvements, new\n> > > features instead of such bikeshedding.  If someone is making a change\n> > > somewhere, he/she can fix the whitespace in the neighbourhood.\n> > \n> > I agree completely.  Did I suggest otherwise?\n> \n> Ah, sorry, I have misunderstood.\n> \n> This is an informational piece, then, isn't it?\n\nYeah, I was generating the diff just as a way to get an idea which paths\nwhich policies should apply to.\n\nThat still doesn't rise much above bikeshedding, but it's not quite as\nbad as actually trying to apply such a diff...\n\n--b.\n"},{"id":"68134","messageId":"m363wxhey1.fsf@localhost.localdomain","threadId":"11990","inReplyTo":"7vr6fletkl.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-09T23:45:35Z","receivedAt":"2008-02-09T23:45:35Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> \"J. Bruce Fields\" <bfields@fieldses.org> writes:\n> \n> > Yeah, fair enough.  Hard to know where to start, though.  OK, just to\n> > get an idea, I committed a completely empty tree, made a diff (with\n> > --binary), then applied with --whitespace=fix and compared to the\n> > original.  In some cases these seem to be accidental, in some cases\n> > (git-p4) I assume they're intended to use the different style.\n> \n> I personally have this in .git/config\n> \n> [core]\n> \twhitespace = indent,trail,space\n> \n> and the following three lines in contrib/.gitattributes (untracked)\n> \n> *.py whitespace=!indent,trail,space\n> *.el whitespace=!indent,trail,space\n> fast-import/git-p4 whitespace=!indent,trail,space\n\nI would also exclude gitweb/gitweb.perl\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"68163","messageId":"7v8x1t5uk1.fsf@gitster.siamese.dyndns.org","threadId":"11990","inReplyTo":"m363wxhey1.fsf@localhost.localdomain","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-10T04:01:18Z","receivedAt":"2008-02-10T04:01:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n>> *.py whitespace=!indent,trail,space\n>> *.el whitespace=!indent,trail,space\n>> fast-import/git-p4 whitespace=!indent,trail,space\n>\n> I would also exclude gitweb/gitweb.perl\n\nWhy?\n\nAs far as I can tell, Perl does not use Python/Elisp \"indents\nare all whitespace\" rule and neither does the script.\n\nIt also happens that I do not personally believe in \"alignment\nwith spaces\" argument.  If you accept W and a SP occupy the same\nhorizontal space (which \"alignment with spaces\" assume), I do\nnot think it is unreasonable to accept HT goes to the next\ncolumn that is multiple of 8 places.\n"},{"id":"68191","messageId":"7vabm9gk1p.fsf@gitster.siamese.dyndns.org","threadId":"11990","inReplyTo":"7vr6fletkl.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-10T10:52:50Z","receivedAt":"2008-02-10T10:52:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I've tried \"unexpand | expand\" to Documentation/*.txt and\ncompared the formatted documentation before and after the\nchange, and as we suspected everything seems to match.\n\nSo I am considering applying this patch.  We may want to tighten\nit later but as the initial set of rules this should do.\n\n-- >8 --\n[PATCH] Add gitattributes file making whitespace checking pickier\n\nThis establishes what the \"bad\" whitespaces are for this\nproject.\n\nThe rules are:\n\n - For C source files, trailing whitespaces, an HT that follows\n   a SP in the leading indent, and initial indent by SP that can\n   be replaced with HT are all bad.\n\n - The same rule applies to the AsciiDoc input files in the\n   Documentation/ hierarchy.\n\n - It is Ok to indent with all spaces the Python and Elisp\n   sources in the contrib/ area.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n .gitattributes               |    1 +\n Documentation/.gitattributes |    1 +\n contrib/.gitattributes       |    3 +++\n 3 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/.gitattributes b/.gitattributes\nnew file mode 100644\nindex 0000000..9dd769a\n--- /dev/null\n+++ b/.gitattributes\n@@ -0,0 +1 @@\n+*.[ch] whitespace\ndiff --git a/Documentation/.gitattributes b/Documentation/.gitattributes\nnew file mode 100644\nindex 0000000..ddb0301\n--- /dev/null\n+++ b/Documentation/.gitattributes\n@@ -0,0 +1 @@\n+*.txt whitespace\ndiff --git a/contrib/.gitattributes b/contrib/.gitattributes\nnew file mode 100644\nindex 0000000..2b48d05\n--- /dev/null\n+++ b/contrib/.gitattributes\n@@ -0,0 +1,3 @@\n+*.py whitespace=!indent,trail,space\n+*.el whitespace=!indent,trail,space\n+fast-import/git-p4 whitespace=!indent,trail,space\n"},{"id":"68196","messageId":"200802101231.16847.jnareb@gmail.com","threadId":"11990","inReplyTo":"7v8x1t5uk1.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-10T11:31:15Z","receivedAt":"2008-02-10T11:31:15Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n>>> *.py whitespace=!indent,trail,space\n>>> *.el whitespace=!indent,trail,space\n\nEmacs Lisp is (like Perl, and contrary to Python) whitespace agnostic,\nso here you just agree on historical usage. In this case the same\nshould IMHO be done for gitweb/gitweb.perl in main .gitattributes.\n\n:<: checks contrib/emacs/git.el :>:\n\nHmmm... it looks like git.el uses only spaces, both for indent\nand for align, with some spurious TABS happening.\n\nIf you allow this, couldn't you allow also for the gitweb.perl?\n\n>>> fast-import/git-p4 whitespace=!indent,trail,space\n>>\n>> I would also exclude gitweb/gitweb.perl\n> \n> Why?\n> \n> As far as I can tell, Perl does not use Python/Elisp \"indents\n> are all whitespace\" rule and neither does the script.\n\nElisp is also whitespace agnostic, but like in Perl it can contain\nhere-docs, and heredoc-like docstring; I'm not sure about whitespace\nrules for that.\n\n> It also happens that I do not personally believe in \"alignment\n> with spaces\" argument.  If you accept W and a SP occupy the same\n> horizontal space (which \"alignment with spaces\" assume), I do\n> not think it is unreasonable to accept HT goes to the next\n> column that is multiple of 8 places.\n \nMy argument is that when you change tab-width (and basic-offset), with\n\"tabs for indent, spaces for align\" you don't have source get out of \nalign. And not everybody uses large screens, and large resolution.\n\nBesides there is also purely theoretical argument of consistency.\nWhen using tabs also for align, it is in prectice align with tabs\n_and spaces_, e.g.:\n\n------>|if (expression ||\n------>|____expression) {\n\nor\n\n------>|print \"something\" .\n------>|______\"something\";\n\nor\n\n------>|$date{'mday-time'} = sprintf \"%d %s %02d:%02d\",\n------>|------>|------>|_____$mday, $months[$mon], $hour ,$min;\n\nwhere leading tab is marked as \"------>|\", and leading space as \"_\".\n\n\nThe argument for using tabs for align is that it is easy to check \nprogramatically for those kind of whitespace errors, and that editors \ndo that. But lacking tools or misconfigured tools shouldn't IMHO be \ncause of selecting a coding style / choosing a policy.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"68246","messageId":"20080210185649.GB8267@fieldses.org","threadId":"11990","inReplyTo":"7vabm9gk1p.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2008-02-10T18:56:49Z","receivedAt":"2008-02-10T18:56:49Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Sun, Feb 10, 2008 at 02:52:50AM -0800, Junio C Hamano wrote:\n> I've tried \"unexpand | expand\" to Documentation/*.txt and\n> compared the formatted documentation before and after the\n> change, and as we suspected everything seems to match.\n\nThanks for testing that.\n\n> So I am considering applying this patch.  We may want to tighten\n> it later but as the initial set of rules this should do.\n\nNo objections from me.--b.\n\n> \n> -- >8 --\n> [PATCH] Add gitattributes file making whitespace checking pickier\n> \n> This establishes what the \"bad\" whitespaces are for this\n> project.\n> \n> The rules are:\n> \n>  - For C source files, trailing whitespaces, an HT that follows\n>    a SP in the leading indent, and initial indent by SP that can\n>    be replaced with HT are all bad.\n> \n>  - The same rule applies to the AsciiDoc input files in the\n>    Documentation/ hierarchy.\n> \n>  - It is Ok to indent with all spaces the Python and Elisp\n>    sources in the contrib/ area.\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n> \n>  .gitattributes               |    1 +\n>  Documentation/.gitattributes |    1 +\n>  contrib/.gitattributes       |    3 +++\n>  3 files changed, 5 insertions(+), 0 deletions(-)\n> \n> diff --git a/.gitattributes b/.gitattributes\n> new file mode 100644\n> index 0000000..9dd769a\n> --- /dev/null\n> +++ b/.gitattributes\n> @@ -0,0 +1 @@\n> +*.[ch] whitespace\n> diff --git a/Documentation/.gitattributes b/Documentation/.gitattributes\n> new file mode 100644\n> index 0000000..ddb0301\n> --- /dev/null\n> +++ b/Documentation/.gitattributes\n> @@ -0,0 +1 @@\n> +*.txt whitespace\n> diff --git a/contrib/.gitattributes b/contrib/.gitattributes\n> new file mode 100644\n> index 0000000..2b48d05\n> --- /dev/null\n> +++ b/contrib/.gitattributes\n> @@ -0,0 +1,3 @@\n> +*.py whitespace=!indent,trail,space\n> +*.el whitespace=!indent,trail,space\n> +fast-import/git-p4 whitespace=!indent,trail,space\n"},{"id":"68257","messageId":"alpine.LNX.1.00.0802101502320.13593@iabervon.org","threadId":"11990","inReplyTo":"7vabm9gk1p.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-02-10T20:22:17Z","receivedAt":"2008-02-10T20:22:17Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Sun, 10 Feb 2008, Junio C Hamano wrote:\n\n> I've tried \"unexpand | expand\" to Documentation/*.txt and\n> compared the formatted documentation before and after the\n> change, and as we suspected everything seems to match.\n> \n> So I am considering applying this patch.  We may want to tighten\n> it later but as the initial set of rules this should do.\n\nI think it's worthwhile to note that some of the files under t/ have \nwhitespace that doesn't conform to the rest of the project. This would \ninclude anything with a email signature break marker (line consisting of \n\"-- \"), as well as patches with non-standard whitespace used for testing \nwhitespace checking, and (I think) correct patches with blank lines as \ncontext. It's possible that we want to declare all of t/ as binary, at \nleast initially, in the theory that we want to test with exact byte \nsequence expectations and inputs.\n\nOn the other hand, I think this patch is an odd combination of stuff; \naren't the contrib exceptions not exceptional, since only *.[ch] and *.txt \ngets declared as \"whitespace\"?\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"68277","messageId":"7v8x1sfprd.fsf@gitster.siamese.dyndns.org","threadId":"11990","inReplyTo":"alpine.LNX.1.00.0802101502320.13593@iabervon.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-10T21:47:02Z","receivedAt":"2008-02-10T21:47:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> On Sun, 10 Feb 2008, Junio C Hamano wrote:\n>\n>> I've tried \"unexpand | expand\" to Documentation/*.txt and\n>> compared the formatted documentation before and after the\n>> change, and as we suspected everything seems to match.\n>> \n>> So I am considering applying this patch.  We may want to tighten\n>> it later but as the initial set of rules this should do.\n>\n> I think it's worthwhile to note that some of the files under t/ have \n> whitespace that doesn't conform to the rest of the project.\n\nYes.  I tried to be careful with the set of attribute files I\nsent out not to corrupt them.  Was I unsuccessful?\n\n> On the other hand, I think this patch is an odd combination of stuff; \n> aren't the contrib exceptions not exceptional, since only *.[ch] and *.txt \n> gets declared as \"whitespace\"?\n\nTrue, how about this instead?\n\n---\n .gitattributes               |    2 ++\n Documentation/.gitattributes |    1 +\n 2 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/.gitattributes b/.gitattributes\nnew file mode 100644\nindex 0000000..6b9c715\n--- /dev/null\n+++ b/.gitattributes\n@@ -0,0 +1,2 @@\n+* whitespace=!indent,trail,space\n+*.[ch] whitespace\ndiff --git a/Documentation/.gitattributes b/Documentation/.gitattributes\nnew file mode 100644\nindex 0000000..ddb0301\n--- /dev/null\n+++ b/Documentation/.gitattributes\n@@ -0,0 +1 @@\n+*.txt whitespace\n"},{"id":"68278","messageId":"7v3as0fpib.fsf@gitster.siamese.dyndns.org","threadId":"11990","inReplyTo":"200802101231.16847.jnareb@gmail.com","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-10T21:52:28Z","receivedAt":"2008-02-10T21:52:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>> Jakub Narebski <jnareb@gmail.com> writes:\n>> \n>>>> *.py whitespace=!indent,trail,space\n>>>> *.el whitespace=!indent,trail,space\n>\n> Emacs Lisp is (like Perl, and contrary to Python) whitespace agnostic,\n\nWhat does agnostic have anything to do with anything?\n\nC is whitespace agnostic and outside obvious places like string\nconstants and #preprocessor directives you can have SP and HT\nand LF interchangeably.  It does not mean you do not need\nwhitespace policy.\n\nIf gitweb historically used SP everywhere like git.el, I think\nthat is a very good reason to treat it just like *.py and *.el,\nthough.  See the updated set of patterns I sent to Daniel just\nnow.\n\n>> It also happens that I do not personally believe in \"alignment\n>> with spaces\" argument.  If you accept W and a SP occupy the same\n>> horizontal space (which \"alignment with spaces\" assume), I do\n>> not think it is unreasonable to accept HT goes to the next\n>> column that is multiple of 8 places.\n>  \n> My argument is ...\n\nWasn't my 5 lines enough clue to save you from repeating that?\nI said I do not agree with it, so please don't even try wasting\neverybody's time on bikeshedding.\n"},{"id":"68285","messageId":"alpine.LNX.1.00.0802101724170.13593@iabervon.org","threadId":"11990","inReplyTo":"7v8x1sfprd.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-02-10T22:34:17Z","receivedAt":"2008-02-10T22:34:17Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Sun, 10 Feb 2008, Junio C Hamano wrote:\n\n> Daniel Barkalow <barkalow@iabervon.org> writes:\n> \n> > On Sun, 10 Feb 2008, Junio C Hamano wrote:\n> >\n> >> I've tried \"unexpand | expand\" to Documentation/*.txt and\n> >> compared the formatted documentation before and after the\n> >> change, and as we suspected everything seems to match.\n> >> \n> >> So I am considering applying this patch.  We may want to tighten\n> >> it later but as the initial set of rules this should do.\n> >\n> > I think it's worthwhile to note that some of the files under t/ have \n> > whitespace that doesn't conform to the rest of the project.\n> \n> Yes.  I tried to be careful with the set of attribute files I\n> sent out not to corrupt them.  Was I unsuccessful?\n\nYour patch wouldn't corrupt them, but also didn't explicitly protect them. \nA later change to regularize git shell scripts would look reasonable but \nrisk messing with them, for example.\n\n> > On the other hand, I think this patch is an odd combination of stuff; \n> > aren't the contrib exceptions not exceptional, since only *.[ch] and *.txt \n> > gets declared as \"whitespace\"?\n> \n> True, how about this instead?\n\nThat makes things more clear, although I'd still like a t/.gitattributes \nthat meant that, regardless of the project's policies in general, t/ files \nmay care about whitespace, so we don't have to worry about that in future \nchanges to the top level .gitattributes. And I'm actually curious as to \nwhether t/ should have some protection against crlf conversion. (I haven't \ntried checking git out with different crlf-conversion settings and seeing \nwhether the tests still work as intended)\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"68320","messageId":"7vk5lcb1zq.fsf@gitster.siamese.dyndns.org","threadId":"11990","inReplyTo":"alpine.LNX.1.00.0802101724170.13593@iabervon.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-11T03:34:01Z","receivedAt":"2008-02-11T03:34:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> On Sun, 10 Feb 2008, Junio C Hamano wrote:\n> ...\n>> True, how about this instead?\n>\n> That makes things more clear, although I'd still like a t/.gitattributes \n> that meant that, regardless of the project's policies in general, t/ files \n> may care about whitespace, so we don't have to worry about that in future \n> changes to the top level .gitattributes.\n\nOk, that's sensible.\n\nThis is what I'll apply.  We can tighten and/or loosen per type\nof the contents as we discover glitches.\n\n--\n\n .gitattributes               |    2 ++\n Documentation/.gitattributes |    1 +\n t/.gitattributes             |    1 +\n 3 files changed, 4 insertions(+), 0 deletions(-)\n create mode 100644 .gitattributes\n create mode 100644 Documentation/.gitattributes\n create mode 100644 t/.gitattributes\n\ndiff --git a/.gitattributes b/.gitattributes\nnew file mode 100644\nindex 0000000..6b9c715\n--- /dev/null\n+++ b/.gitattributes\n@@ -0,0 +1,2 @@\n+* whitespace=!indent,trail,space\n+*.[ch] whitespace\ndiff --git a/Documentation/.gitattributes b/Documentation/.gitattributes\nnew file mode 100644\nindex 0000000..ddb0301\n--- /dev/null\n+++ b/Documentation/.gitattributes\n@@ -0,0 +1 @@\n+*.txt whitespace\ndiff --git a/t/.gitattributes b/t/.gitattributes\nnew file mode 100644\nindex 0000000..562b12e\n--- /dev/null\n+++ b/t/.gitattributes\n@@ -0,0 +1 @@\n+* -whitespace\n"},{"id":"68491","messageId":"20080212074323.GD27535@lavos.net","threadId":"11990","inReplyTo":"7vabm9gk1p.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Brian Downing","fromEmail":"bdowning@lavos.net","sentAt":"2008-02-12T07:43:23Z","receivedAt":"2008-02-12T07:43:23Z","isPatch":true,"sender":{"key":"bdowning@lavos.net","avatar":"https://avatars.githubusercontent.com/u/366426?v=4"},"body":"On Sun, Feb 10, 2008 at 02:52:50AM -0800, Junio C Hamano wrote:\n>  - It is Ok to indent with all spaces the Python and Elisp\n>    sources in the contrib/ area.\n\nShould contrib simply be exempt from all rules?  Certainly with my\ncontribution to contrib (contrib/stats/packinfo.pl) I made no effort to\nconform to the Git style because I thought contribs were auxiliary to\nGit.  (It contains indention with all spaces, which is my personal\ndefault style.)\n\n-bcd\n"},{"id":"68555","messageId":"7vbq6l3l8o.fsf@gitster.siamese.dyndns.org","threadId":"11990","inReplyTo":"20080212074323.GD27535@lavos.net","subject":"Re: [PATCH] Add gitattributes file making whitespace checking pickier","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-12T21:42:15Z","receivedAt":"2008-02-12T21:42:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"bdowning@lavos.net (Brian Downing) writes:\n\n> On Sun, Feb 10, 2008 at 02:52:50AM -0800, Junio C Hamano wrote:\n>>  - It is Ok to indent with all spaces the Python and Elisp\n>>    sources in the contrib/ area.\n>\n> Should contrib simply be exempt from all rules?  Certainly with my\n> contribution to contrib (contrib/stats/packinfo.pl) I made no effort to\n> conform to the Git style because I thought contribs were auxiliary to\n> Git.  (It contains indention with all spaces, which is my personal\n> default style.)\n\nYou are quoting an older draft.  The rules applied to 'master'\nis actually a bit more lenient:\n\n - Unless otherwise specified, indent with SP that could be\n   replaced with HT are not \"bad\".  But SP before HT in the\n   indent is \"bad\", and trailing whitespaces are \"bad\".\n\n - For C source files, initial indent by SP that can be replaced\n   with HT is also \"bad\".\n\n - Test scripts in t/ and test vectors in its subdirectories can\n   contain anything, so we make it unrestricted for now.\n\nSo your particular \"indent without HT\" is generally accepted,\nand considered a violation only in C sources.\n\nI see what you mean by \"excempt from all rules\" and it is\ncertainly a valid approach, but I at the same time think minimal\nwhitespace policy should be there, and flagging trailing spaces\nand SP before HT is a good idea.\n"}]}