{"thread":{"id":"12028","subject":"[DOC BUG] branch.autosetupmerge defaults to true, not false","startedAt":"2008-02-11T08:46:58Z","lastAt":"2008-02-11T11:36:22Z","messageCount":4,"participants":["Kalle Olavi Niemitalo","Junio C Hamano","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"68341","messageId":"87bq6nc22l.fsf@Astalo.kon.iki.fi","threadId":"12028","inReplyTo":null,"subject":"[DOC BUG] branch.autosetupmerge defaults to true, not false","fromName":"Kalle Olavi Niemitalo","fromEmail":"kon@iki.fi","sentAt":"2008-02-11T08:46:58Z","receivedAt":"2008-02-11T08:46:58Z","isPatch":false,"sender":{"key":"kon@iki.fi","avatar":null},"body":"In Git v1.5.4.1, Documentation/config.txt describes:\n\n> branch.autosetupmerge::\n>         Tells `git-branch` and `git-checkout` to setup new branches\n>         so that linkgit:git-pull[1] will appropriately merge from that\n>         remote branch.  Note that even if this option is not set,\n>         this behavior can be chosen per-branch using the `--track`\n>         and `--no-track` options.  This option defaults to false.\n\nHowever, in builtin-branch.c:\n\n> static int branch_track = 1;\n...\n>         if (!strcmp(var, \"branch.autosetupmerge\"))\n>                         branch_track = git_config_bool(var, value);\n\nSo if the option is not listed in .git/config, then it actually\ndefaults to true.  A demonstration with a bit older version:\n\n$ git --version\ngit version 1.5.4.rc3\n$ git config --unset branch.autosetupmerge\n$ git branch demo elinks.cz/master\nBranch demo set up to track remote branch refs/remotes/elinks.cz/master.\n$ \n"},{"id":"68346","messageId":"7vejbjam9g.fsf@gitster.siamese.dyndns.org","threadId":"12028","inReplyTo":"87bq6nc22l.fsf@Astalo.kon.iki.fi","subject":"Re: [DOC BUG] branch.autosetupmerge defaults to true, not false","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-11T09:13:47Z","receivedAt":"2008-02-11T09:13:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kalle Olavi Niemitalo <kon@iki.fi> writes:\n\n> In Git v1.5.4.1, Documentation/config.txt describes:\n>\n>> branch.autosetupmerge::\n>>         Tells `git-branch` and `git-checkout` to setup new branches\n>>         so that linkgit:git-pull[1] will appropriately merge from that\n>>         remote branch.  Note that even if this option is not set,\n>>         this behavior can be chosen per-branch using the `--track`\n>>         and `--no-track` options.  This option defaults to false.\n>\n> However, in builtin-branch.c:\n>\n>> static int branch_track = 1;\n> ...\n>>         if (!strcmp(var, \"branch.autosetupmerge\"))\n>>                         branch_track = git_config_bool(var, value);\n>\n> So if the option is not listed in .git/config, then it actually\n> defaults to true.  A demonstration with a bit older version:\n\nCorrect.  34a3e69 (git-branch: default to --track) did it\nwithout updating the documentation.\n"},{"id":"68375","messageId":"alpine.LSU.1.00.0802111125100.3870@racer.site","threadId":"12028","inReplyTo":"7vejbjam9g.fsf@gitster.siamese.dyndns.org","subject":"Re: [DOC BUG] branch.autosetupmerge defaults to true, not false","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-11T11:27:20Z","receivedAt":"2008-02-11T11:27:20Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"[PATCH] Document that the default of branch.autosetupmerge is true\n\nIn 34a3e69 (git-branch: default to --track) the default was changed to\ntrue, to help new git users.  But yours truly forgot to update the\ndocumentation.  This fixes it.\n\nNoticed by Kalle Olavi Niemitalo.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tOn Mon, 11 Feb 2008, Junio C Hamano wrote:\n\n\t> Kalle Olavi Niemitalo <kon@iki.fi> writes:\n\t> \n\t> > In Git v1.5.4.1, Documentation/config.txt describes:\n\t> >\n\t> >> branch.autosetupmerge::\n\t> >> Tells `git-branch` and `git-checkout` to setup new branches\n\t> >> so that linkgit:git-pull[1] will appropriately merge from \n\t> >> that remote branch.  Note that even if this option is not \n\t> >> set, this behavior can be chosen per-branch using the \n\t> >> `--track` and `--no-track` options.  This option defaults to \n\t> >> false.\n\t> >\n\t> > However, in builtin-branch.c:\n\t> >\n\t> >> static int branch_track = 1;\n\t> > ...\n\t> >> if (!strcmp(var, \"branch.autosetupmerge\"))\n\t> >> branch_track = git_config_bool(var, value);\n\t> >\n\t> > So if the option is not listed in .git/config, then it actually\n\t> > defaults to true.  A demonstration with a bit older version:\n\t> \n\t> Correct.  34a3e69 (git-branch: default to --track) did it\n\t> without updating the documentation.\n\n\tYeah, sorry.  I had hoped that Jakub or some other documentation \n\tfan would step up to it.\n\n\tHopefully I did catch all places.\n\n Documentation/config.txt       |    2 +-\n Documentation/git-branch.txt   |   15 ++++++++-------\n Documentation/git-checkout.txt |    7 ++++---\n 3 files changed, 13 insertions(+), 11 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 59305a3..b5d682e 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -382,7 +382,7 @@ branch.autosetupmerge::\n \tso that linkgit:git-pull[1] will appropriately merge from that\n \tremote branch.  Note that even if this option is not set,\n \tthis behavior can be chosen per-branch using the `--track`\n-\tand `--no-track` options.  This option defaults to false.\n+\tand `--no-track` options.  This option defaults to true.\n \n branch.<name>.remote::\n \tWhen in branch <name>, it tells `git fetch` which remote to fetch.\ndiff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt\nindex 9ea9249..f1de846 100644\n--- a/Documentation/git-branch.txt\n+++ b/Documentation/git-branch.txt\n@@ -35,11 +35,11 @@ Note that this will create the new branch, but it will not switch the\n working tree to it; use \"git checkout <newbranch>\" to switch to the\n new branch.\n \n-When a local branch is started off a remote branch, git can setup the\n+When a local branch is started off a remote branch, git sets up the\n branch so that linkgit:git-pull[1] will appropriately merge from that\n-remote branch.  If this behavior is desired, it is possible to make it\n-the default using the global `branch.autosetupmerge` configuration\n-flag.  Otherwise, it can be chosen per-branch using the `--track`\n+remote branch.  If this behavior is not desired, it is possible to\n+disable it using the global `branch.autosetupmerge` configuration\n+flag.  That setting can be overridden by using the `--track`\n and `--no-track` options.\n \n With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.\n@@ -109,10 +109,11 @@ OPTIONS\n \tSet up configuration so that git-pull will automatically\n \tretrieve data from the remote branch.  Use this if you always\n \tpull from the same remote branch into the new branch, or if you\n-\tdon't want to use \"git pull <repository> <refspec>\" explicitly.  Set the\n-\tbranch.autosetupmerge configuration variable to true if you\n+\tdon't want to use \"git pull <repository> <refspec>\" explicitly.\n+\tThis behavior is the default.  Set the\n+\tbranch.autosetupmerge configuration variable to false if you\n \twant git-checkout and git-branch to always behave as if\n-\t'--track' were given.\n+\t'--no-track' were given.\n \n --no-track::\n \tWhen a branch is created off a remote branch,\ndiff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt\nindex 584359f..b4cfa04 100644\n--- a/Documentation/git-checkout.txt\n+++ b/Documentation/git-checkout.txt\n@@ -52,10 +52,11 @@ OPTIONS\n \tset up configuration so that git-pull will automatically\n \tretrieve data from the remote branch.  Use this if you always\n \tpull from the same remote branch into the new branch, or if you\n-\tdon't want to use \"git pull <repository> <refspec>\" explicitly.  Set the\n-\tbranch.autosetupmerge configuration variable to true if you\n+\tdon't want to use \"git pull <repository> <refspec>\" explicitly.\n+\tThis behavior is the default.  Set the\n+\tbranch.autosetupmerge configuration variable to false if you\n \twant git-checkout and git-branch to always behave as if\n-\t'--track' were given.\n+\t'--no-track' were given.\n \n --no-track::\n \tWhen -b is given and a branch is created off a remote branch,\n-- \n1.5.4.1264.gb53928\n"},{"id":"68377","messageId":"alpine.LSU.1.00.0802111136030.3870@racer.site","threadId":"12028","inReplyTo":"alpine.LSU.1.00.0802111125100.3870@racer.site","subject":"Re: [DOC BUG] branch.autosetupmerge defaults to true, not false","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-11T11:36:22Z","receivedAt":"2008-02-11T11:36:22Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 11 Feb 2008, Johannes Schindelin wrote:\n\n> [PATCH] Document that the default of branch.autosetupmerge is true\n\nOoops.  That should have been the subject.\n\nEmbarassed,\nDscho\n"}]}