How do I exclude a git submodule from update using python?

Michael Dubin

When I run the following command from a bash shell, it works as expected, and updates all submodules except the one indicated as to-be-ignored:

git -c submodule."MySub".update=none submodule update --init --recursive

However, when I attempt the same thing in python using subprocess, MySub gets updated as well:

cmd = ['git', '-c', 'submodule."MySub".update=none', 'submodule', 'update', '--init', '--recursive']

subprocess.call(cmd)

Do I need to format the 'submodule."MySub".update=none' argument differently?

Chris Maes

In bash you can use the quotes for special characters in the submodule path (slashes for example), but in python you don't need them. Try it with:

'submodule.MySub.update=none'

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to exclude a specific git submodule from update?

How do I check out a specific version of a submodule using 'git submodule'?

How to update git submodule

How I do Exclude Android Project Submodule's test from Gradle test

How do I "commit" changes in a git submodule?

How to import python file from git submodule

How do I resolve git merge conflicts on a submodule from `git stash pop`

How do I exclude files from git ls-files?

How do I exclude files from git archive?

How do I "export" things from a submodule?

How do I move an existing Git submodule within a Git repository?

How do I update the GUI from another thread? using python

how to update one submodule git?

How do I enable my Azure pipeline to checkout a submodule using Git?

How do I get git submodule changes from parent to child repository?

How do I remove untracked directory tree (submodule / sub-repository) from main git repository?

How do I add a git submodule that has no master branch?

How do I get the SHA of HEAD in a specific git submodule?

How do I revert my changes to a git submodule?

How do I replace a git submodule with another repo?

How do I add sub directory of directory as a git submodule?

How do I "git add" a modified submodule into the main module?

How do I exclude all subdirectories from Gradle zip task using Ant include/exclude pattern?

python git-submodule importing from other git-submodule

How to update a git submodule hierarchy selectively?

How to check and update the submodule revision pointer in Git

How do I remove a submodule?

How do I update my git submodules from specific branches?

how do I update an app created manually from git in Openshift?

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  3. 3

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  4. 4

    pump.io port in URL

  5. 5

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  8. 8

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

  9. 9

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  10. 10

    How to remove the extra space from right in a webview?

  11. 11

    java.lang.NullPointerException: Cannot read the array length because "<local3>" is null

  12. 12

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  13. 13

    flutter: dropdown item programmatically unselect problem

  14. 14

    How to use merge windows unallocated space into Ubuntu using GParted?

  15. 15

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  16. 16

    Nuget add packages gives access denied errors

  17. 17

    Svchost high CPU from Microsoft.BingWeather app errors

  18. 18

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  19. 19

    12.04.3--- Dconf Editor won't show com>canonical>unity option

  20. 20

    Any way to remove trailing whitespace *FOR EDITED* lines in Eclipse [for Java]?

  21. 21

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

HotTag

Archive