]> git.ipfire.org Git - thirdparty/git.git/commit
doc: merge-tree: improve example script
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Wed, 9 Oct 2024 16:53:45 +0000 (18:53 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Oct 2024 17:40:42 +0000 (10:40 -0700)
commitc4b8fb6ef2114a4df4dc7a0a07233e91a272a29e
treedc02a7529ac92d7421146df2d497da4c63941cc3
parent4f71522dfb7fc53eff569023303980c66114b1bc
doc: merge-tree: improve example script

• Provide a commit message in the example command.

  The command will hang since it is waiting for a commit message on
  stdin.  Which is usable but not straightforward enough since this is
  example code.
• Use `||` directly since that is more straightforward than checking the
  last exit status.

  Also use `echo` and `exit` since `die` is not defined.
• Expose variable declarations.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-merge-tree.txt