1. 09 10月, 2020 1 次提交
    • D
      checkout: learn to respect checkout.guess · 64f1f58f
      Denton Liu 提交于
      The current behavior of git checkout/switch is that --guess is currently
      enabled by default. However, some users may not wish for this to happen
      automatically. Instead of forcing users to specify --no-guess manually
      each time, teach these commands the checkout.guess configuration
      variable that gives users the option to set a default behavior.
      
      Teach the completion script to recognize the new config variable and
      disable DWIM logic if it is set to false.
      Signed-off-by: NDenton Liu <liu.denton@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      64f1f58f
  2. 07 4月, 2020 2 次提交
    • D
      doc: --recurse-submodules mostly applies to active submodules · acbfae32
      Damien Robert 提交于
      The documentation refers to "initialized" or "populated" submodules,
      to explain which submodules are affected by '--recurse-submodules', but
      the real terminology here is 'active' submodules. Update the
      documentation accordingly.
      
      Some terminology:
      - Active is defined in gitsubmodules(7), it only involves the
        configuration variables 'submodule.active', 'submodule.<name>.active'
        and 'submodule.<name>.url'. The function
        submodule.c::is_submodule_active checks that a submodule is active.
      - Populated means that the submodule's working tree is present (and the
        gitfile correctly points to the submodule repository), i.e. either the
        superproject was cloned with ` --recurse-submodules`, or the user ran
        `git submodule update --init`, or `git submodule init [<path>]` and
        `git submodule update [<path>]` separately which populated the
        submodule working tree. This does not involve the 3 configuration
        variables above.
      - Initialized (at least in the context of the man pages involved in this
        patch) means both "populated" and "active" as defined above, i.e. what
        `git submodule update --init` does.
      
      The --recurse-submodules option mostly affects active submodules. An
      exception is `git fetch` where the option affects populated submodules.
      As a consequence, in `git pull --recurse-submodules` the fetch affects
      populated submodules, but the resulting working tree update only affects
      active submodules.
      
      In the documentation of `git-pull`, let's distinguish between the
      fetching part which affects populated submodules, and the updating of
      worktrees, which only affects active submodules.
      Signed-off-by: NDamien Robert <damien.olivier.robert+git@gmail.com>
      Helped-by: NPhilippe Blain <levraiphilippeblain@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      acbfae32
    • D
      doc: document --recurse-submodules for reset and restore · b3cec573
      Damien Robert 提交于
      Also unify the formulation about --no-recurse-submodules for checkout
      and switch, which we reuse for restore.
      
      And correct the formulation about submodules' HEAD in read-tree, which
      we reuse in reset.
      Signed-off-by: NDamien Robert <damien.olivier.robert+git@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b3cec573
  3. 07 5月, 2019 1 次提交
  4. 02 4月, 2019 1 次提交
    • N
      checkout: split part of it to new command 'switch' · d787d311
      Nguyễn Thái Ngọc Duy 提交于
      "git checkout" doing too many things is a source of confusion for many
      users (and it even bites old timers sometimes). To remedy that, the
      command will be split into two new ones: switch and restore. The good
      old "git checkout" command is still here and will be until all (or most
      of users) are sick of it.
      
      See the new man page for the final design of switch. The actual
      implementation though is still pretty much the same as "git checkout"
      and not completely aligned with the man page. Following patches will
      adjust their behavior to match the man page.
      Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d787d311