Re: [PATCH v3 1/1] docs: highlight that .gitmodules does not support !command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/13/23 21:55, Junio C Hamano wrote:
Petar Vutov <pvutov@xxxxxxx> writes:

Don't.  People should be familiar with "configuration variable", but
may not be with "git-config variable".

Right, on closer inspection this collision with .gitmodules is rather niche to start with. Few things in .gitconfig are also legal in .gitmodules.

-The following 'update' procedures are only available via the
-`submodule.<name>.update` configuration variable:
-
-	custom command;; arbitrary shell command that takes a single
-	    argument (the sha1 of the commit recorded in the
-	    superproject) is executed. When `submodule.<name>.update`
-	    is set to '!command', the remainder after the exclamation mark
-	    is the custom command.
-
  	none;; the submodule is not updated.
+ custom command;; When the `submodule.<name>.update`
+	    configuration variable is set to `!custom command`, the
+	    object name of the commit recorded in the superproject
+	    for the submodule is appended to the `custom command`
+	    string and gets executed.  Note that this mechanism
+	    cannot be used in the `.gitmodules` file.
+
  If the submodule is not yet initialized, and you just want to use the
  setting as stored in `.gitmodules`, you can automatically initialize the
  submodule with the `--init` option.

I prefer the original description as it uses shorter sentences. I can't hold that 5-liner in my head :)

But now I really am bikeshedding, and I've taken enough of your time. I will send a v4 with just the .gitmodules disclaimer, no rewrite, in case you end up agreeing.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux