Help new contributors by providing some advice about line-wrapping; the advice basically boils down to "use 80 columns minus some slop as a rule of thumb", but also "use common sense", and "avoid gratuitous rewrapping". Signed-off-by: Wincent Colaiuta <win@wincent.com> --- El 14/11/2007, a las 18:19, Johannes Schindelin escribió:Ah, didn't see that. It's in the "C programs" section and I was trying to provide a guideline that applied to all source types (given that this all started with a doc patch to an AsciiDoc source file). I was basically just trying to help new people from making the same mistake that I did; ie. not knowing if there was an official limit, looking at the maximum line length in a file, making sure my patch didn't exceed that length (and re-wrapping to avoid exceeding it), and then getting reprimanded for gratuitous re-wrapping. As for the explicitness, I was just paraphrasing the guidelines as Junio expressed them. 134 lines down (the current length of CodingGuidelines with that patch), about 100,000 lines to go (the rest of the codebase). So if we try very hard, we could indeed get there. Here follows a revised patch which is more concise, and keeps all wrapping references at a single place. I lose your "at most 80 characters" in favor of Junio's "80-characters minus some slop", and in fact state "80 columns" rather than "80 characters", because that's what we're really talking about, isn't it? Cheers, Wincent Documentation/CodingGuidelines | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Documentation/CodingGuidelines b/Documentation/ CodingGuidelines index 3b042db..d2d1f32 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -58,8 +58,6 @@ For C programs: - We use tabs to indent, and interpret tabs as taking up to 8 spaces. - - We try to keep to at most 80 characters per line. - - When declaring pointers, the star sides with the variable name, i.e. "char *string", not "char* string" or "char * string". This makes it easier to understand code @@ -110,3 +108,14 @@ For C programs: used in the git core command set (unless your command is clearly separate from it, such as an importer to convert random-scm-X repositories to git). + +Line wrapping: + + - We generally try to keep scripts, C source files and AsciiDoc + documentation within the range of "80 columns minus some slop" + to accommodate diff change marks [-+ ] and quoting ">> " in + emails. + + - When submitting patches use common sense to decide whether to + rewrap (or reindent), avoiding gratuitous changes. + -- 1.5.3.5 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Borislav Petkov | 2.6.23-rc1: no setup signature found... |
| Andrew Morton | Re: [PATCH] Memory management livelock |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Steven King | ti_usb_3410_5052 breakage in 2.6.24-rc1 |
git: | |
| Linus Torvalds | cleaner/better zlib sources? |
| Theodore Ts'o | [PATCH] Add --no-reuse-delta, --window, and --depth options to git-gc |
| Karl | Re: [PATCH] Add a birdview-on-the-source-code section to the user manual |
| Yossi Leybovich | corrupt object on git-gc |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Richard Stallman | Re: Real men don't attack straw men |
| David Newman | setting dscp or tos bits |
| Stijn | Re: [i386/Thinkpad T41]USB mouse + Xorg obsd 4.1 |
| Quentin Garnier | [cube@cubidou.net: Re: Moving ethfoo in the main tree] |
| cube | Moving ethfoo in the main tree |
| Blair Sadewitz | PCI latency timer values |
| Oliver Gould | kqemu: driver(9)/filedesc(9) questions |
