From 01f6fd4b4e59bc131941d917138cdd2cc6662382 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 8 Oct 2010 11:46:59 -0500 Subject: Documentation: No argument of ALLOC_GROW should have side-effects The explanatory comment before the definition of ALLOC_GROW carefully lists arguments that will be used more than once and thus cannot have side-effects; a lazy reader might conclude that the arguments not listed are used only once and side effects safe. Correct it to list all three arguments, avoiding this confusion. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.h b/cache.h index 3d5ed51989..33decd942d 100644 --- a/cache.h +++ b/cache.h @@ -445,7 +445,7 @@ extern int init_db(const char *template_dir, unsigned int flags); * at least 'nr' entries; the number of entries currently allocated * is 'alloc', using the standard growing factor alloc_nr() macro. * - * DO NOT USE any expression with side-effect for 'x' or 'alloc'. + * DO NOT USE any expression with side-effect for 'x', 'nr', or 'alloc'. */ #define ALLOC_GROW(x, nr, alloc) \ do { \ -- cgit v1.2.3 From 537497be58850dc9c54281d0306b422ab604cdee Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Fri, 8 Oct 2010 08:50:20 +0200 Subject: Documentation: update-index: -z applies also to --index-info Signed-off-by: Bert Wesarg Signed-off-by: Junio C Hamano --- Documentation/git-update-index.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index 74d1d49dbf..26fd8d0df8 100644 --- a/Documentation/git-update-index.txt +++ b/Documentation/git-update-index.txt @@ -144,8 +144,8 @@ you will need to handle the situation manually. Report what is being added and removed from index. -z:: - Only meaningful with `--stdin`; paths are separated with - NUL character instead of LF. + Only meaningful with `--stdin` or `--index-info`; paths are + separated with NUL character instead of LF. \--:: Do not interpret any more arguments as options. -- cgit v1.2.3 From bc979945305b87caf1e5975d30d42bafd88ad846 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 13 Oct 2010 11:15:14 -0700 Subject: CodingGuidelines: reword parameter expansion section Group entries related to parameter substitutions together and avoid using the word "regexp" to refer to the ${parameter/pattern/string} substitution (banned), as the pattern there is a shell glob and not a regular expression. Signed-off-by: Junio C Hamano --- Documentation/CodingGuidelines | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 8346c1972b..09ffc46563 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -35,25 +35,28 @@ For shell scripts specifically (not exhaustive): properly nests. It should have been the way Bourne spelled it from day one, but unfortunately isn't. - - We use ${parameter-word} and its [-=?+] siblings, and their - colon'ed "unset or null" form. + - We use POSIX compliant parameter substitutions and avoid bashisms; + namely: - - We use ${parameter#word} and its [#%] siblings, and their - doubled "longest matching" form. + - We use ${parameter-word} and its [-=?+] siblings, and their + colon'ed "unset or null" form. - - We use Arithmetic Expansion $(( ... )). + - We use ${parameter#word} and its [#%] siblings, and their + doubled "longest matching" form. - - Inside Arithmetic Expansion, spell shell variables with $ in front - of them, as some shells do not grok $((x)) while accepting $(($x)) - just fine (e.g. dash older than 0.5.4). + - No "Substring Expansion" ${parameter:offset:length}. - - No "Substring Expansion" ${parameter:offset:length}. + - No shell arrays. - - No shell arrays. + - No strlen ${#parameter}. - - No strlen ${#parameter}. + - No pattern replacement ${parameter/pattern/string}. - - No regexp ${parameter/pattern/string}. + - We use Arithmetic Expansion $(( ... )). + + - Inside Arithmetic Expansion, spell shell variables with $ in front + of them, as some shells do not grok $((x)) while accepting $(($x)) + just fine (e.g. dash older than 0.5.4). - We do not use Process Substitution <(list) or >(list). -- cgit v1.2.3 From 69ae92bda13dfbf0b7d169c57b9f2715af2a9d67 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 13 Oct 2010 11:36:36 -0700 Subject: shell portability: no "export VAR=VAL" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is more portable to say "VAR=VAL && export VAR" instead. Noticed by Ævar. Signed-off-by: Junio C Hamano --- git-am.sh | 2 +- git-rebase.sh | 2 +- git-stash.sh | 2 +- t/t1509-root-worktree.sh | 28 ++++++++++++++-------------- t/t5560-http-backend-noserver.sh | 8 ++++---- t/t556x_common | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/git-am.sh b/git-am.sh index e7f008c7ba..5f249485df 100755 --- a/git-am.sh +++ b/git-am.sh @@ -137,7 +137,7 @@ It does not apply to blobs recorded in its index." export GITHEAD_$his_tree if test -n "$GIT_QUIET" then - export GIT_MERGE_VERBOSITY=0 + GIT_MERGE_VERBOSITY=0 && export GIT_MERGE_VERBOSITY fi git-merge-recursive $orig_tree -- HEAD $his_tree || { git rerere $allow_rerere_autoupdate diff --git a/git-rebase.sh b/git-rebase.sh index 3335cee70b..e5df23bb83 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -111,7 +111,7 @@ call_merge () { export GITHEAD_$cmt GITHEAD_$hd if test -n "$GIT_QUIET" then - export GIT_MERGE_VERBOSITY=1 + GIT_MERGE_VERBOSITY=1 && export GIT_MERGE_VERBOSITY fi eval 'git-merge-$strategy' $strategy_opts '"$cmt^" -- "$hd" "$cmt"' rv=$? diff --git a/git-stash.sh b/git-stash.sh index 5fb1245ea7..7561b374d2 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -373,7 +373,7 @@ apply_stash () { if test -n "$GIT_QUIET" then - export GIT_MERGE_VERBOSITY=0 + GIT_MERGE_VERBOSITY=0 && export GIT_MERGE_VERBOSITY fi if git merge-recursive $b_tree -- $c_tree $w_tree then diff --git a/t/t1509-root-worktree.sh b/t/t1509-root-worktree.sh index 7f60fd0b2e..335420fd87 100755 --- a/t/t1509-root-worktree.sh +++ b/t/t1509-root-worktree.sh @@ -134,8 +134,8 @@ cat >ls.expected <act @@ -26,8 +26,8 @@ GET() { } POST() { - export REQUEST_METHOD="POST" && - export CONTENT_TYPE="application/x-$1-request" && + REQUEST_METHOD="POST" && export REQUEST_METHOD && + CONTENT_TYPE="application/x-$1-request" && export CONTENT_TYPE && run_backend "/repo.git/$1" "$2" && unset REQUEST_METHOD && unset CONTENT_TYPE && @@ -46,7 +46,7 @@ log_div() { . "$TEST_DIRECTORY"/t556x_common expect_aliased() { - export REQUEST_METHOD="GET" && + REQUEST_METHOD="GET" && export REQUEST_METHOD && if test $1 = 0; then run_backend "$2" else diff --git a/t/t556x_common b/t/t556x_common index be024e551c..51287d89d8 100755 --- a/t/t556x_common +++ b/t/t556x_common @@ -50,7 +50,7 @@ get_static_files() { } SMART=smart -export GIT_HTTP_EXPORT_ALL=1 +GIT_HTTP_EXPORT_ALL=1 && export GIT_HTTP_EXPORT_ALL test_expect_success 'direct refs/heads/master not found' ' log_div "refs/heads/master" GET refs/heads/master "404 Not Found" @@ -73,7 +73,7 @@ test_expect_success 'export if git-daemon-export-ok' ' get_static_files "200 OK" ' SMART=smart -export GIT_HTTP_EXPORT_ALL=1 +GIT_HTTP_EXPORT_ALL=1 && export GIT_HTTP_EXPORT_ALL test_expect_success 'static file if http.getanyfile true is ok' ' log_div "getanyfile true" config http.getanyfile true && -- cgit v1.2.3 From 9d83e3827fc1031bbcafb0d26128e95dda306aed Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 11 Oct 2010 11:03:32 -0500 Subject: Documentation: gitrevisions is in section 7 Fix references to gitrevisions(1) in the manual pages and HTML documentation. In practice, this will not matter much unless someone tries to use a hard copy of the git reference manual. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-cat-file.txt | 2 +- Documentation/git-check-ref-format.txt | 2 +- Documentation/git-cherry-pick.txt | 2 +- Documentation/git-diff.txt | 4 ++-- Documentation/git-fast-import.txt | 2 +- Documentation/git-format-patch.txt | 2 +- Documentation/git-log.txt | 2 +- Documentation/git-push.txt | 2 +- Documentation/git-reflog.txt | 2 +- Documentation/git-revert.txt | 2 +- Documentation/git-show-branch.txt | 2 +- Documentation/git-show.txt | 2 +- Documentation/git.txt | 2 +- Documentation/gitcore-tutorial.txt | 2 +- Documentation/gitk.txt | 2 +- Documentation/user-manual.txt | 8 ++++---- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index a3f56b07fd..544ba7ba21 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -27,7 +27,7 @@ OPTIONS :: The name of the object to show. For a more complete list of ways to spell object names, see - the "SPECIFYING REVISIONS" section in linkgit:gitrevisions[1]. + the "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. -t:: Instead of the content, show the object type identified by diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt index f5c2e0601d..205d83dd0b 100644 --- a/Documentation/git-check-ref-format.txt +++ b/Documentation/git-check-ref-format.txt @@ -49,7 +49,7 @@ git imposes the following rules on how references are named: These rules make it easy for shell script based tools to parse reference names, pathname expansion by the shell when a reference name is used unquoted (by mistake), and also avoids ambiguities in certain -reference name expressions (see linkgit:gitrevisions[1]): +reference name expressions (see linkgit:gitrevisions[7]): . A double-dot `..` is often used as in `ref1..ref2`, and in some contexts this notation means `{caret}ref1 ref2` (i.e. not in diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 2cef579316..3c96fa8c86 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -21,7 +21,7 @@ OPTIONS ...:: Commits to cherry-pick. For a more complete list of ways to spell commits, see - linkgit:gitrevisions[1]. + linkgit:gitrevisions[7]. Sets of commits can be passed but no traversal is done by default, as if the '--no-walk' option was specified, see linkgit:git-rev-list[1]. diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 08fd4099ad..481a33c7d1 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -68,11 +68,11 @@ for the last two forms that use ".." notations, can be any . For a more complete list of ways to spell , see -"SPECIFYING REVISIONS" section in linkgit:gitrevisions[1]. +"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. However, "diff" is about comparing two _endpoints_, not ranges, and the range notations (".." and "\...") do not mean a range as defined in the -"SPECIFYING RANGES" section in linkgit:gitrevisions[1]. +"SPECIFYING RANGES" section in linkgit:gitrevisions[7]. OPTIONS ------- diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index 966ba4f213..2c6ad5b2f3 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -439,7 +439,7 @@ Marks must be declared (via `mark`) before they can be used. * A complete 40 byte or abbreviated commit SHA-1 in hex. * Any valid Git SHA-1 expression that resolves to a commit. See - ``SPECIFYING REVISIONS'' in linkgit:gitrevisions[1] for details. + ``SPECIFYING REVISIONS'' in linkgit:gitrevisions[7] for details. The special case of restarting an incremental import from the current branch value should be written as: diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 4b3f5ba535..a00b783fe5 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -39,7 +39,7 @@ There are two ways to specify which commits to operate on. that leads to the to be output. 2. Generic expression (see "SPECIFYING - REVISIONS" section in linkgit:gitrevisions[1]) means the + REVISIONS" section in linkgit:gitrevisions[7]) means the commits in the specified range. The first rule takes precedence in the case of a single . To diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index c213bdbdc5..6d40f0011b 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -31,7 +31,7 @@ OPTIONS either or is omitted, it defaults to `HEAD`, i.e. the tip of the current branch. For a more complete list of ways to spell - and , see linkgit:gitrevisions[1]. + and , see linkgit:gitrevisions[7]. --follow:: Continue listing the history of a file beyond renames diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 020955ff5a..e11660a2e6 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -41,7 +41,7 @@ OPTIONS[[OPTIONS]] + The is often the name of the branch you would want to push, but it can be any arbitrary "SHA-1 expression", such as `master~4` or -`HEAD` (see linkgit:gitrevisions[1]). +`HEAD` (see linkgit:gitrevisions[7]). + The tells which ref on the remote side is updated with this push. Arbitrary expressions cannot be used here, an actual ref must diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt index 5a0451aaf3..e50bd9b68d 100644 --- a/Documentation/git-reflog.txt +++ b/Documentation/git-reflog.txt @@ -40,7 +40,7 @@ see linkgit:git-log[1]. The reflog is useful in various git commands, to specify the old value of a reference. For example, `HEAD@\{2\}` means "where HEAD used to be two moves ago", `master@\{one.week.ago\}` means "where master used to -point to one week ago", and so on. See linkgit:gitrevisions[1] for +point to one week ago", and so on. See linkgit:gitrevisions[7] for more details. To delete single entries from the reflog, use the subcommand "delete" diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index b7d9ef7e47..f40984d144 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -31,7 +31,7 @@ OPTIONS ...:: Commits to revert. For a more complete list of ways to spell commit names, see - linkgit:gitrevisions[1]. + linkgit:gitrevisions[7]. Sets of commits can also be given but no traversal is done by default, see linkgit:git-rev-list[1] and its '--no-walk' option. diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt index 6453263340..8dbcf1acd4 100644 --- a/Documentation/git-show-branch.txt +++ b/Documentation/git-show-branch.txt @@ -32,7 +32,7 @@ no nor is given on the command line. OPTIONS ------- :: - Arbitrary extended SHA1 expression (see linkgit:gitrevisions[1]) + Arbitrary extended SHA1 expression (see linkgit:gitrevisions[7]) that typically names a branch head or a tag. :: diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt index 0002bfb045..2049c60f75 100644 --- a/Documentation/git-show.txt +++ b/Documentation/git-show.txt @@ -36,7 +36,7 @@ OPTIONS ...:: The names of objects to show. For a more complete list of ways to spell object names, see - "SPECIFYING REVISIONS" section in linkgit:gitrevisions[1]. + "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. include::pretty-options.txt[] diff --git a/Documentation/git.txt b/Documentation/git.txt index dd57bdc436..b46c6f6d77 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -495,7 +495,7 @@ HEAD:: (i.e. the contents of `$GIT_DIR/refs/heads/`). For a more complete list of ways to spell object names, see -"SPECIFYING REVISIONS" section in linkgit:gitrevisions[1]. +"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. File/Directory Structure diff --git a/Documentation/gitcore-tutorial.txt b/Documentation/gitcore-tutorial.txt index 5e9c5ebba3..c27d086f68 100644 --- a/Documentation/gitcore-tutorial.txt +++ b/Documentation/gitcore-tutorial.txt @@ -971,7 +971,7 @@ commits from the master branch. The string inside brackets before the commit log message is a short name you can use to name the commit. In the above example, 'master' and 'mybranch' are branch heads. 'master^' is the first parent of 'master' -branch head. Please see linkgit:gitrevisions[1] if you want to +branch head. Please see linkgit:gitrevisions[7] if you want to see more complex cases. [NOTE] diff --git a/Documentation/gitk.txt b/Documentation/gitk.txt index 05ac1c79f7..e21bac4f3f 100644 --- a/Documentation/gitk.txt +++ b/Documentation/gitk.txt @@ -69,7 +69,7 @@ frequently used options. the form "''..''" to show all revisions between '' and back to ''. Note, more advanced revision selection can be applied. For a more complete list of ways to spell object names, see - linkgit:gitrevisions[1]. + linkgit:gitrevisions[7]. ...:: diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index ce45bfcc04..5b6de22c96 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -397,7 +397,7 @@ is usually a shortcut for the HEAD branch in the repository "origin". For the complete list of paths which git checks for references, and the order it uses to decide which to choose when there are multiple references with the same shorthand name, see the "SPECIFYING -REVISIONS" section of linkgit:gitrevisions[1]. +REVISIONS" section of linkgit:gitrevisions[7]. [[Updating-a-repository-With-git-fetch]] Updating a repository with git fetch @@ -568,7 +568,7 @@ We have seen several ways of naming commits already: - HEAD: refers to the head of the current branch There are many more; see the "SPECIFYING REVISIONS" section of the -linkgit:gitrevisions[1] man page for the complete list of ways to +linkgit:gitrevisions[7] man page for the complete list of ways to name revisions. Some examples: ------------------------------------------------- @@ -909,7 +909,7 @@ commits reachable from some head but not from any tag in the repository: $ gitk $( git show-ref --heads ) --not $( git show-ref --tags ) ------------------------------------------------- -(See linkgit:gitrevisions[1] for explanations of commit-selecting +(See linkgit:gitrevisions[7] for explanations of commit-selecting syntax such as `--not`.) [[making-a-release]] @@ -1635,7 +1635,7 @@ you've checked out. The reflogs are kept by default for 30 days, after which they may be pruned. See linkgit:git-reflog[1] and linkgit:git-gc[1] to learn how to control this pruning, and see the "SPECIFYING REVISIONS" -section of linkgit:gitrevisions[1] for details. +section of linkgit:gitrevisions[7] for details. Note that the reflog history is very different from normal git history. While normal history is shared by every repository that works on the -- cgit v1.2.3 From ed84e6d511f9e754d6331c63468bf7421b1e0894 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 11 Oct 2010 11:04:08 -0500 Subject: Documentation: diff can compare blobs Meanwhile, there is no plumbing command to compare two blobs. Strange. Reported-by: Yann Dirson Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-diff.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 481a33c7d1..db2c6c2d31 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -64,8 +64,9 @@ forced by --no-index. Just in case if you are doing something exotic, it should be noted that all of the in the above description, except -for the last two forms that use ".." notations, can be any -. +in the last two forms that use ".." notations, can be any +. The third form ('git diff ') can also +be used to compare two objects. For a more complete list of ways to spell , see "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. -- cgit v1.2.3 From b77134b068f777c9b63ebfb8762c77968c49702f Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 11 Oct 2010 11:05:32 -0500 Subject: Documentation: expand 'git diff' SEE ALSO section Point in many directions in the hope of helping the reader find what is needed more quickly. This commit also removes the summary attached to the SEE ALSO entry for difftool, to avoid making the SEE ALSO list too verbose. If the reader wants a summary of the commands referred to, she can always look to the top of the named pages or to the table of contents on the main git(1) page. Suggested-by: Goswin von Brederlow Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-diff.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index db2c6c2d31..fe34d4edb4 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -160,8 +160,12 @@ rewrites (very expensive). SEE ALSO -------- -linkgit:git-difftool[1]:: - Show changes using common diff tools +diff(1), +linkgit:git-difftool[1], +linkgit:git-log[1], +linkgit:gitdiffcore[7], +linkgit:git-format-patch[1], +linkgit:git-apply[1] Author ------ -- cgit v1.2.3 From 24757702395ed4c828af585f2d8ba0efda5cf697 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 11 Oct 2010 11:06:18 -0500 Subject: Documentation: update implicit "--no-index" behavior in "git diff" Originally "--no-index" mode triggered for untracked files within the tracked tree, but with v1.5.6-rc1~41 (Merge branch 'jc/diff-no-no-index, 2008-05-26) the command was fixed to only implicitly trigger when paths outside the tracked tree are mentioned. Reported-by: Yann Dirson Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-diff.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index fe34d4edb4..dd1fb32786 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -23,9 +23,9 @@ tree and the index file, or the index file and the working tree. further add to the index but you still haven't. You can stage these changes by using linkgit:git-add[1]. + -If exactly two paths are given, and at least one is untracked, -compare the two files / directories. This behavior can be -forced by --no-index. +If exactly two paths are given and at least one points outside +the current repository, 'git diff' will compare the two files / +directories. This behavior can be forced by --no-index. 'git diff' [--options] --cached [] [--] [...]:: -- cgit v1.2.3 From 352953a556e7f8d720e26a32d4aabbf823d3c4d4 Mon Sep 17 00:00:00 2001 From: "Luck, Tony" Date: Fri, 1 Oct 2010 11:57:52 -0700 Subject: Better advice on using topic branches for kernel development Linus Torvalds wrote: > The real problem is that maintainers often pick random - and not at > all stable - points for their development to begin with. They just > pick some random "this is where Linus -git tree is today", and do > their development on top of that. THAT is the problem - they are > unaware that there's some nasty bug in that version. Maybe they do this because they read it in the Git user-manual. Fix the manual to give them better guidance. Signed-off-by: Tony Luck Signed-off-by: Junio C Hamano --- Documentation/user-manual.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index 5b6de22c96..77eb483b07 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -2171,11 +2171,14 @@ $ git push mytree release Now to apply some patches from the community. Think of a short snappy name for a branch to hold this patch (or related group of -patches), and create a new branch from the current tip of Linus's -branch: +patches), and create a new branch from a recent stable tag of +Linus's branch. Picking a stable base for your branch will: +1) help you: by avoiding inclusion of unrelated and perhaps lightly +tested changes +2) help future bug hunters that use "git bisect" to find problems ------------------------------------------------- -$ git checkout -b speed-up-spinlocks origin +$ git checkout -b speed-up-spinlocks v2.6.35 ------------------------------------------------- Now you apply the patch(es), run some tests, and commit the change(s). If -- cgit v1.2.3