KEMBAR78
Comparing 39006893f9...ee69b2a90c · git/git · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 39006893f9
Choose a base ref
...
head repository: git/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ee69b2a90c
Choose a head ref
  • 7 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 3, 2018

  1. git-submodule.sh: align error reporting for update mode to use path

    All other error messages in cmd_update are reporting the submodule based
    on its path, so let's do that for invalid update modes, too.
    
    Signed-off-by: Stefan Beller <sbeller@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    stefanbeller authored and gitster committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    ff03d93 View commit details
    Browse the repository at this point in the history
  2. git-submodule.sh: rename unused variables

    The 'mode' variable is not used in cmd_update for its original purpose,
    rename it to 'dummy' as it only serves the purpose to abort quickly
    documenting this knowledge.
    
    The variable 'stage' is also not used any more in cmd_update, so remove it.
    
    This went unnoticed as first each function used the commonly used
    submodule listing, which was converted in 74703a1 (submodule: rewrite
    `module_list` shell function in C, 2015-09-02). When cmd_update was
    using its own function starting in 4830868 (git submodule update:
    have a dedicated helper for cloning, 2016-02-29), its removal was missed.
    
    A later patch in this series also touches the communication between
    the submodule helper and git-submodule.sh, but let's have this as
    a preparatory patch, as it eases the next patch, which stores the
    raw data instead of the line printed for this communication.
    
    Signed-off-by: Stefan Beller <sbeller@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    stefanbeller authored and gitster committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    9eca701 View commit details
    Browse the repository at this point in the history
  3. builtin/submodule--helper: factor out submodule updating

    Separate the command line parsing from the actual execution of the command
    within the repository. For now there is not a lot of execution as
    most of it is still in git-submodule.sh.
    
    Signed-off-by: Stefan Beller <sbeller@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    stefanbeller authored and gitster committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    90efe59 View commit details
    Browse the repository at this point in the history
  4. builtin/submodule--helper: store update_clone information in a struct

    The information that is printed for update_submodules in
    'submodule--helper update-clone' and consumed by 'git submodule update'
    is stored as a string per submodule. This made sense at the time of
    4830868 (git submodule update: have a dedicated helper for cloning,
    2016-02-29), but as we want to migrate the rest of the submodule update
    into C, we're better off having access to the raw information in a helper
    struct.
    
    Signed-off-by: Stefan Beller <sbeller@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    stefanbeller authored and gitster committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    f1d1571 View commit details
    Browse the repository at this point in the history
  5. builtin/submodule--helper: factor out method to update a single submo…

    …dule
    
    In a later patch we'll find this method handy.
    
    Signed-off-by: Stefan Beller <sbeller@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    stefanbeller authored and gitster committed Aug 3, 2018
    Configuration menu
    Copy the full SHA
    c94d9dc View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2018

  1. submodule--helper: replace connect-gitdir-workingtree by ensure-core-…

    …worktree
    
    e983175 (submodule: ensure core.worktree is set after update,
    2018-06-18) was overly aggressive in calling connect_work_tree_and_git_dir
    as that ensures both the 'core.worktree' configuration is set as well as
    setting up correct gitlink file pointing at the git directory.
    
    We do not need to check for the gitlink in this part of the cmd_update
    in git-submodule.sh, as the initial call to update-clone will have ensured
    that. So we can reduce the work to only (check and potentially) set the
    'core.worktree' setting.
    
    While at it move the check from shell to C as that proves to be useful in
    a follow up patch, as we do not need the 'name' in shell now.
    
    Signed-off-by: Stefan Beller <sbeller@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    stefanbeller authored and gitster committed Aug 14, 2018
    Configuration menu
    Copy the full SHA
    74d4731 View commit details
    Browse the repository at this point in the history
  2. submodule--helper: introduce new update-module-mode helper

    This chews off a bit of the shell part of the update command in
    git-submodule.sh. When writing the C code, keep in mind that the
    submodule--helper part will go away eventually and we want to have
    a C function that is able to determine the submodule update strategy,
    it as a nicety, make determine_submodule_update_strategy accessible
    for arbitrary repositories.
    
    Signed-off-by: Stefan Beller <sbeller@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    stefanbeller authored and gitster committed Aug 14, 2018
    Configuration menu
    Copy the full SHA
    ee69b2a View commit details
    Browse the repository at this point in the history
Loading