What is the mean of <param name="submodules">master</param>
here is a <param name="submodules">master</param> configuration in tar_scm.service, but I don't know what the specific meaning of this parameter is.And i kown the difference is git submodule update --init --recursive and git submodule update --init --recursive --remote in TarSCM/scm/git.py. But I don't know why this distinction is made.
liuxueping.snow@bytedance.com wrote:
here is a <param name="submodules">master</param> configuration in tar_scm.service, but I don't know what the specific meaning of this parameter is.And i kown the difference is git submodule update --init --recursive and git submodule update --init --recursive --remote in TarSCM/scm/git.py. But I don't know why this distinction is made.
In such cases, when you're in doubt about some service parameter, you can always go to the specific service package GitHub's repository to get those kinds of details [1]. They usually are documented enough there, so you don't torture yourself trying to guess it :-) Kind regards, Luciano [1] https://github.com/openSUSE/obs-service-tar_scm/blob/026bf0e08d904f092e7dbdb...
I have read this document, but it does not explain the difference between enable and master.I don't know when I should use "master".
Ah, OK. Now I got you. Let me quote the "--submodules" flag option help text: Whether or not to include git submodules from SCM commit log since a given parent revision (see changesrevision). Use 'master' to fetch the latest master. As you can see -- even though the wording may sound a bit confusing --, using "master" will pull the master branch of the _submodules_ instead of the pinned commit hash. As an example, let's take a look at sharkdp's bat CLI tool, a replacement for the cat tool [2]: The v0.18.0 revision tree, under assets/syntaxes subdir [3], we have "01_Packages @ 759d6ee". The pinned commit hash there is "759d6ee" [4], opposed to the, now latest (2022-11-30), in master "6371a1b" [5]. In other words, it's a way to "update" out of date submodules while sacrificing reliability, since the pinned commit ID is what most people will use/test after using `git clone ...`. Kind regards, Luciano [1] https://github.com/openSUSE/obs-service-tar_scm/blob/026bf0e08d904f092e7dbdb... [2] https://github.com/sharkdp/bat [3] https://github.com/sharkdp/bat/tree/v0.18.0/assets/syntaxes [4] https://github.com/sublimehq/Packages/tree/759d6eed9b4beed87e602a23303a121c3... [5] https://github.com/sublimehq/Packages/commit/6371a1bbf66ab0e0c57d179d0d5fb70... ________________________________________ From: liuxueping.snow@bytedance.com <liuxueping.snow@bytedance.com> Sent: Tuesday, November 29, 2022 00:03 To: buildservice@lists.opensuse.org Subject: Re: What is the mean of <param name="submodules">master</param> I have read this document, but it does not explain the difference between enable and master.I don't know when I should use "master".
Let me quote the "--submodules" flag option help text:
That should be read as:
Let me quote the "--submodules" flag option help text [1]:
________________________________________ From: liuxueping.snow@bytedance.com <liuxueping.snow@bytedance.com> Sent: Tuesday, November 29, 2022 00:03 To: buildservice@lists.opensuse.org Subject: Re: What is the mean of <param name="submodules">master</param> I have read this document, but it does not explain the difference between enable and master.I don't know when I should use "master".
participants (3)
-
liuxueping.snow@bytedance.com
-
luc14n0@opensuse.org
-
Luciano Santos