1c1ab244fSSascha Wildner.\" Copyright (c) 2003,2004 The DragonFly Project. All rights reserved. 2c1ab244fSSascha Wildner.\" 3c1ab244fSSascha Wildner.\" This code is derived from software contributed to The DragonFly Project 4c1ab244fSSascha Wildner.\" by Matthew Dillon <dillon@backplane.com> 5c1ab244fSSascha Wildner.\" 6c1ab244fSSascha Wildner.\" Redistribution and use in source and binary forms, with or without 7c1ab244fSSascha Wildner.\" modification, are permitted provided that the following conditions 8c1ab244fSSascha Wildner.\" are met: 9c1ab244fSSascha Wildner.\" 10c1ab244fSSascha Wildner.\" 1. Redistributions of source code must retain the above copyright 11c1ab244fSSascha Wildner.\" notice, this list of conditions and the following disclaimer. 12c1ab244fSSascha Wildner.\" 2. Redistributions in binary form must reproduce the above copyright 13c1ab244fSSascha Wildner.\" notice, this list of conditions and the following disclaimer in 14c1ab244fSSascha Wildner.\" the documentation and/or other materials provided with the 15c1ab244fSSascha Wildner.\" distribution. 16c1ab244fSSascha Wildner.\" 3. Neither the name of The DragonFly Project nor the names of its 17c1ab244fSSascha Wildner.\" contributors may be used to endorse or promote products derived 18c1ab244fSSascha Wildner.\" from this software without specific, prior written permission. 19c1ab244fSSascha Wildner.\" 20c1ab244fSSascha Wildner.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21c1ab244fSSascha Wildner.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22c1ab244fSSascha Wildner.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23c1ab244fSSascha Wildner.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24c1ab244fSSascha Wildner.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25c1ab244fSSascha Wildner.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 26c1ab244fSSascha Wildner.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27c1ab244fSSascha Wildner.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28c1ab244fSSascha Wildner.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29c1ab244fSSascha Wildner.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 30c1ab244fSSascha Wildner.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31c1ab244fSSascha Wildner.\" SUCH DAMAGE. 32c1ab244fSSascha Wildner.\" 338a7bdfeaSSascha Wildner.\" $DragonFly: src/share/man/man7/committer.7,v 1.11 2008/05/02 02:05:06 swildner Exp $ 34c1ab244fSSascha Wildner.\" 35*a0c9baf1SSascha Wildner.Dd December 3, 2008 36c1ab244fSSascha Wildner.Dt COMMITTER 7 37c1ab244fSSascha Wildner.Os 38c1ab244fSSascha Wildner.Sh NAME 39c1ab244fSSascha Wildner.Nm committer 40ac5c99e1SSascha Wildner.Nd rules for DragonFly committers 41c8757e6eSMatthias Schmidt.Sh GIT REPOSITORY ON YOUR LOCAL MACHINE 42c8757e6eSMatthias SchmidtSee 43c8757e6eSMatthias Schmidt.Xr development 7 44c8757e6eSMatthias Schmidthow to obtain a fresh copy of the 455f72456dSSascha Wildner.Dx 46c8757e6eSMatthias Schmidtgit repository on your machine. 47c8757e6eSMatthias SchmidtNote that all developers have to pull/push through 48c8757e6eSMatthias Schmidt.Xr ssh 1 . 495f72456dSSascha WildnerYour 50c8757e6eSMatthias Schmidt.Pa ~/.gitconfig 51c8757e6eSMatthias Schmidtshould contain at least: 52c1ab244fSSascha Wildner.Bd -literal -offset indent 53c8757e6eSMatthias Schmidt[user] 54c8757e6eSMatthias Schmidt name = Your Name 55c8757e6eSMatthias Schmidt email = <login>@dragonflybsd.org 56c1ab244fSSascha Wildner.Ed 575f72456dSSascha Wildner.Pp 58*a0c9baf1SSascha WildnerAlternatively, see the 59*a0c9baf1SSascha Wildner.Va user.name 60*a0c9baf1SSascha Wildnerand 61*a0c9baf1SSascha Wildner.Va user.email 62*a0c9baf1SSascha Wildnervariables in 63*a0c9baf1SSascha Wildner.Xr git-config 1 . 64*a0c9baf1SSascha Wildner.Sh SSH DSA KEYS 65c8757e6eSMatthias SchmidtThe git repository machine is 665f72456dSSascha Wildner.Pa crater.dragonflybsd.org , 675f72456dSSascha Wildnerand the 685f72456dSSascha Wildner.Dx 695f72456dSSascha Wildnerdeveloper machine is 705f72456dSSascha Wildner.Pa leaf.dragonflybsd.org . 715f72456dSSascha WildnerWe create 72c1ab244fSSascha Wildneran account for you on both machines and install your public SSH 73c1ab244fSSascha Wildnerkey to give you access. 74c1ab244fSSascha Wildner.Pp 755f72456dSSascha WildnerYour 765f72456dSSascha Wildner.Pa crater 773501b626SSascha Wildneraccount is set up for git repository only. 783501b626SSascha WildnerIt can only operate as a git slave and cannot be logged into. 793501b626SSascha WildnerThat is, 805f72456dSSascha Wildner.Pa crater.dragonflybsd.org 815f72456dSSascha Wildneris only used as part of 82c8757e6eSMatthias Schmidt.Nm git Cm push 835f72456dSSascha Wildneroperations. 84c1ab244fSSascha Wildner.Pp 855f72456dSSascha WildnerYour 865f72456dSSascha Wildner.Pa leaf 873501b626SSascha Wildneraccount is a general developer account. 883501b626SSascha WildnerAny 895f72456dSSascha Wildner.Dx 905f72456dSSascha Wildnerdeveloper can have a 915f72456dSSascha Wildner.Pa leaf 925f72456dSSascha Wildneraccount, whether a committer or not. 93c1ab244fSSascha WildnerIt can be useful as a developer rendezvous, 943501b626SSascha Wildnerhowever. 953501b626SSascha WildnerFor example, people upload kernel cores to 965f72456dSSascha Wildner.Pa leaf 975f72456dSSascha Wildnerso other 983501b626SSascha Wildnerdevelopers can look at them. 993501b626SSascha WildnerYou log into your 1005f72456dSSascha Wildner.Pa leaf 1015f72456dSSascha Wildneraccount with: 102*a0c9baf1SSascha Wildner.Bd -literal -offset indent 103*a0c9baf1SSascha Wildnerssh you@leaf.dragonflybsd.org 104*a0c9baf1SSascha Wildner.Ed 105c1ab244fSSascha Wildner.Pp 1065f72456dSSascha WildnerThe rules for account use are in 1075f72456dSSascha Wildner.Pa leaf Ap s 1085f72456dSSascha WildnerMOTD. 109c1ab244fSSascha WildnerIt is very important that you never install a password or create a SSH 1105f72456dSSascha Wildnerkey pair on 1115f72456dSSascha Wildner.Pa leaf 1125f72456dSSascha Wildnerto use to access other machines. 1135f72456dSSascha WildnerBecause non-committers can have 1145f72456dSSascha Wildner.Pa leaf 115*a0c9baf1SSascha Wildneraccounts, 1165f72456dSSascha Wildner.Pa leaf 117*a0c9baf1SSascha Wildneris not considered a secure machine. 118c1ab244fSSascha Wildner.Sh TESTING COMMIT ACCESS 1195f72456dSSascha WildnerThere is a directory called 1205f72456dSSascha Wildner.Pa /usr/src/test/test . 1215f72456dSSascha WildnerTo test your commit 1223221afbeSHasso Tepperaccess, try making a modification and committing a file in this 123c1ab244fSSascha Wildnerdirectory. 124c8757e6eSMatthias SchmidtTry to push the commit to 125c8757e6eSMatthias Schmidt.Pa crater 126c8757e6eSMatthias Schmidtafterwards. 127c1ab244fSSascha Wildner.Bd -literal -offset indent 128c1ab244fSSascha Wildnercd /usr/src/test/test 129c1ab244fSSascha Wildner(edit something) 130c8757e6eSMatthias Schmidtgit commit file_you_edited 131c8757e6eSMatthias Schmidtgit push crater 132c1ab244fSSascha Wildner.Ed 133163ffa07SSascha Wildner.Sh COMMITTING REAL WORK 1343501b626SSascha WildnerMake modifications as needed. 1353501b626SSascha WildnerFor example, edit files. 1363501b626SSascha WildnerIf adding new files make git aware of them like this. 1373501b626SSascha WildnerFiles and directories can just be added locally. 1383501b626SSascha WildnerThese operations do not actually affect the master repository. 1393501b626SSascha WildnerInstead they are stored in your local copy of the repository and then 1405f72456dSSascha Wildnersynchronized to the repository when you 141c8757e6eSMatthias Schmidt.Nm git Cm push . 142c1ab244fSSascha Wildner.Bd -literal -offset indent 143c8757e6eSMatthias Schmidtgit add filename 144c8757e6eSMatthias Schmidtgit commit filename 145c1ab244fSSascha Wildner.Ed 146c1ab244fSSascha Wildner.Pp 147c8757e6eSMatthias SchmidtTo actually push your changes to the the repository on 148c8757e6eSMatthias Schmidt.Pa crater , 149c8757e6eSMatthias Schmidtuse: 150c1ab244fSSascha Wildner.Bd -literal -offset indent 151c8757e6eSMatthias Schmidtgit push crater 152c1ab244fSSascha Wildner.Ed 153c1ab244fSSascha Wildner.Pp 154c8757e6eSMatthias SchmidtSee 155c8757e6eSMatthias Schmidt.Xr development 7 156c8757e6eSMatthias Schmidthow to commit to a specific branch (to merge bug fixes, for example). 157b0960c8bSSascha Wildner.Pp 158c8757e6eSMatthias SchmidtDo not set the default remote tag to 159c8757e6eSMatthias Schmidt.Pa origin . 160c8757e6eSMatthias SchmidtIt is set to 161c8757e6eSMatthias Schmidt.Pa crater 162c8757e6eSMatthias Schmidtby default. 163c1ab244fSSascha WildnerThis reduces instances where accidental commits or repository 164c8757e6eSMatthias Schmidtoperations are made on the master repository. 165c8757e6eSMatthias Schmidt.Sh STRUCTURE OF COMMIT MESSAGES 166*a0c9baf1SSascha WildnerAs many 167*a0c9baf1SSascha Wildner.Xr git 1 168*a0c9baf1SSascha Wildnertools display the first line of a commit message as a summary, 169*a0c9baf1SSascha Wildnerstructure your commit messages like this, if possible: 170c8757e6eSMatthias Schmidt.Bd -literal -offset indent 171*a0c9baf1SSascha WildnerOne line summary of your change. 172c8757e6eSMatthias Schmidt 173c8757e6eSMatthias SchmidtMaybe more text here describing your changes in detail (including 174c8757e6eSMatthias Schmidtissue tracker id's etc). 175c8757e6eSMatthias Schmidt.Ed 176c1ab244fSSascha Wildner.Sh DISCUSSING COMMITTABLE WORK BEFOREHAND 177*a0c9baf1SSascha WildnerDiscussion prior to committing usually occurs on the 178*a0c9baf1SSascha Wildner.Pa kernel@ , 179*a0c9baf1SSascha Wildner.Pa submit@ , 180*a0c9baf1SSascha Wildneror 181*a0c9baf1SSascha Wildner.Pa bugs@ 182*a0c9baf1SSascha Wildnermailing lists and depends on the work involved. 183*a0c9baf1SSascha WildnerSimple and obvious work such as documentation edits or additions, 184*a0c9baf1SSascha Wildnerdoesn't really need a heads up. 185c1ab244fSSascha Wildner.Pp 186*a0c9baf1SSascha WildnerSimple and obvious bug fixes don't need a heads up either, other than to 187c1ab244fSSascha Wildnersay that you will (or just have) committed the fix, so you don't 1883501b626SSascha Wildnerrace other committers trying to do the same thing. 1893501b626SSascha WildnerUsually the developer most active in a discussion about a bug commits the 190c1ab244fSSascha Wildnerfix, but it isn't considered a big deal. 191c1ab244fSSascha Wildner.Pp 192c1ab244fSSascha WildnerMore complex issues are usually discussed on the lists first. 193c1ab244fSSascha WildnerNon-trivial but straight forward bug fixes usually go through 1945f72456dSSascha Wildnera testing period, where you say something like: 1955f72456dSSascha Wildner.Do 1965f72456dSSascha WildnerHere is a patch 1973501b626SSascha Wildnerto driver BLAH that fixes A, B, and C, please test it. 1983501b626SSascha WildnerIf there are no objections I will commit it next Tuesday. 1995f72456dSSascha Wildner.Dc 2005f72456dSSascha Wildner(usually a week, 201c1ab244fSSascha Wildneror more depending on the complexity of the patch). 202c1ab244fSSascha Wildner.Pp 2033501b626SSascha WildnerNew drivers or utilities are usually discussed. 2043501b626SSascha WildnerCommitters will often commit new work 2055f72456dSSascha Wildner.Em without 2065f72456dSSascha Wildnerhooking it into the buildworld or 207c1ab244fSSascha Wildnerbuildkernel infrastructure in order to be able to continue 208c1ab244fSSascha Wildnerdevelopment on it in piecemeal without having to worry about it 209c1ab244fSSascha Wildnerbreaking buildworld or buildkernel, and then they hook it in as a 2103501b626SSascha Wildnerlast step after they've stabilized it. 2113501b626SSascha WildnerExamples of this include 212c1ab244fSSascha Wildnernew versions of GCC, updates to vendor packages such as bind, 213c1ab244fSSascha Wildnersendmail, etc. 214*a0c9baf1SSascha Wildner.Sh SOURCE OWNERSHIP 215*a0c9baf1SSascha WildnerAreas within the repository do not 216*a0c9baf1SSascha Wildner.Dq belong 217*a0c9baf1SSascha Wildnerto any committer. 218c1ab244fSSascha WildnerOften situations will arise where one developer commits work and 219c1ab244fSSascha Wildneranother developer finds an issue with it that needs to be corrected. 220c1ab244fSSascha Wildner.Pp 2213501b626SSascha WildnerAll committed work becomes community property. 2223501b626SSascha WildnerNo developer has a 223*a0c9baf1SSascha Wildner.Dq lock 2243501b626SSascha Wildneron any part of the source tree. 2253501b626SSascha WildnerHowever, if a developer is 226c1ab244fSSascha Wildneractively working on a portion of the source tree and you find a bug 227*a0c9baf1SSascha Wildneror other issue, courtesy dictates that you post to 228*a0c9baf1SSascha Wildner.Pa kernel@ 229*a0c9baf1SSascha Wildnerand/or email the developer. 230c1ab244fSSascha Wildner.Pp 231c1ab244fSSascha WildnerThis means that, generally, if you do not see a commit to an area 232c1ab244fSSascha Wildnerof the source tree in the last few weeks, it isn't considered active and 233c1ab244fSSascha Wildneryou don't really need to confer with the developer that made the 234*a0c9baf1SSascha Wildnercommit, though you should still post to the 235*a0c9baf1SSascha Wildner.Pa kernel@ 236*a0c9baf1SSascha Wildnermailing list and, of course, confer with developers when their expertise 237*a0c9baf1SSascha Wildneris needed. 238c1ab244fSSascha Wildner.Pp 2393501b626SSascha WildnerOne exception to this rule is documentation. 2403501b626SSascha WildnerIf any developer commits 2413501b626SSascha Wildnernew work, the documentation guys have free reign to go in and correct 2425f72456dSSascha Wildner.Xr mdoc 7 2433501b626SSascha Wildnererrors. 2443501b626SSascha WildnerThis is really a convenience as most developers are not 2455f72456dSSascha Wildner.Xr mdoc 7 246*a0c9baf1SSascha Wildnergurus and it's a waste of time for the doc guys to post to 247*a0c9baf1SSascha Wildner.Pa kernel@ 248*a0c9baf1SSascha Wildnerfor all the little corrections they make. 249c1ab244fSSascha Wildner.Sh CONFLICTS 250c96b78ddSSascha WildnerOn the occasion that a major code conflict occurs, for example if two 251c1ab244fSSascha Wildnerpeople are doing major work in the same area of the source tree and forgot 252c1ab244fSSascha Wildnerto collaborate with each other, the project leader will be responsible for 2533501b626SSascha Wildnerresolving the conflict. 2543501b626SSascha WildnerAgain, the repository is considered community 255c1ab244fSSascha Wildnerproperty and it must be acceptable for any developer to be able to work on 256c1ab244fSSascha Wildnerany area of the tree that he or she has an interest in. 257c1ab244fSSascha Wildner.Sh MAJOR ARCHITECTURAL CHANGES 258*a0c9baf1SSascha WildnerThis is generally 259*a0c9baf1SSascha Wildner.An Matt Dillon Ap s 260*a0c9baf1SSascha Wildnerarea of expertise. 261*a0c9baf1SSascha WildnerAll major architectural changes must be discussed on the 262*a0c9baf1SSascha Wildner.Pa kernel@ 263*a0c9baf1SSascha Wildnermailing list and he retains veto power. 264c1ab244fSSascha Wildner.Pp 2653501b626SSascha WildnerThis isn't usually an issue with any work. 2663501b626SSascha WildnerAt best if something 2675f72456dSSascha Wildnerdoesn't look right architecturally he'll chip in with adjustments to 2683501b626SSascha Wildnermake it fit in. 2693501b626SSascha WildnerNothing ever really gets vetoed. 2705f72456dSSascha Wildner.Sh SEE ALSO 2711503211cSMatthias Schmidt.Xr git 1 Pq Pa pkgsrc/devel/scmgit , 2725f72456dSSascha Wildner.Xr development 7 273