git-footers.1 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. '\" t
  2. .\" Title: git-footers
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 05/03/2019
  6. .\" Manual: Chromium depot_tools Manual
  7. .\" Source: depot_tools e58cce6c
  8. .\" Language: English
  9. .\"
  10. .TH "GIT\-FOOTERS" "1" "05/03/2019" "depot_tools e58cce6c" "Chromium depot_tools Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. git-footers \- Extract meta\-information expressed as footers in a commit message\&.
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit footers\fR [\-\-key FOOTER] REF
  36. \fIgit footers\fR [\-\-position | \-\-position\-ref | \-\-position\-num] REF
  37. .fi
  38. .sp
  39. .SH "DESCRIPTION"
  40. .sp
  41. git footers extracts information included in commit messages as "footers", which are roughly like HTTP headers except they are at the end\&. For example, a commit might look like:
  42. .sp
  43. .if n \{\
  44. .RS 4
  45. .\}
  46. .nf
  47. This is a fancy commit message\&.
  48. .fi
  49. .if n \{\
  50. .RE
  51. .\}
  52. .sp
  53. .if n \{\
  54. .RS 4
  55. .\}
  56. .nf
  57. Cr\-Commit\-Position: refs/heads/master@{#292272}
  58. Tech\-Debt\-Introduced: 17 nanoMSOffices
  59. .fi
  60. .if n \{\
  61. .RE
  62. .\}
  63. .sp
  64. git footers knows how to extract this information\&.
  65. .sp
  66. Footers are order\-independent and can appear more than once\&. Thus they are treated as a multimap\&.
  67. .SH "OPTIONS"
  68. .sp
  69. If no options are given, all footers are printed, with their names case\-normalized\&.
  70. .PP
  71. \-\-key FOOTER
  72. .RS 4
  73. Extract all the headers associated with the given key, and print one per line\&. If there are no footers with this key, produces no output and exits successfully\&.
  74. .RE
  75. .PP
  76. \-\-position
  77. .RS 4
  78. Extract the Chrome commit position from the footers\&. This first attempts to get the value of the
  79. Cr\-Commit\-Position
  80. footer\&. If that doesn\(cqt exist then it tries a heuristic based on
  81. Git\-Svn\-Id\&. Output is in one of the following forms:
  82. .sp
  83. .if n \{\
  84. .RS 4
  85. .\}
  86. .nf
  87. refs/heads/master@{#292272}
  88. refs/branch\-heads/branchname
  89. .fi
  90. .if n \{\
  91. .RE
  92. .\}
  93. .RE
  94. .PP
  95. \-\-position\-num
  96. .RS 4
  97. Extracts and prints the Chrome commit position number only (292272 in the example above)\&. Exits with an error if one cannot be found\&.
  98. .RE
  99. .PP
  100. \-\-position\-ref
  101. .RS 4
  102. Extracts and prints the Chrome commit position ref name only (ref/heads/master
  103. or
  104. refs/branch\-heads/branchname
  105. in the example above)\&.
  106. .RE
  107. .SH "EXAMPLE"
  108. .sp
  109. .sp
  110. .if n \{\
  111. .RS 4
  112. .\}
  113. .nf
  114. \fB$ git footers HEAD\fR
  115. Tech\-Debt\-Introduced: \-4 microMSOffices
  116. Tech\-Debt\-Introduced: 17 microMSOffices
  117. Cr\-Commit\-Position: refs/heads/master@{#292272}
  118. \fB$ git footers \-\-key Tech\-Debt\-Introduced HEAD\fR
  119. \-4 microMSOffices
  120. 17 microMSOffices
  121. \fB$ git footers \-\-position HEAD\fR
  122. refs/heads/master@{#292272}
  123. \fB$ git footers \-\-position\-num HEAD\fR
  124. 292272
  125. \fB$ git footers \-\-position\-ref HEAD\fR
  126. refs/heads/master
  127. .fi
  128. .if n \{\
  129. .RE
  130. .\}
  131. .sp
  132. .SH "SEE ALSO"
  133. .sp
  134. \fBgit-number\fR(1)
  135. .SH "CHROMIUM DEPOT_TOOLS"
  136. .sp
  137. Part of the chromium \fBdepot_tools\fR(7) suite\&. These tools are meant to assist with the development of chromium and related projects\&. Download the tools from \m[blue]\fBhere\fR\m[]\&\s-2\u[1]\d\s+2\&.
  138. .SH "NOTES"
  139. .IP " 1." 4
  140. here
  141. .RS 4
  142. \%https://chromium.googlesource.com/chromium/tools/depot_tools.git
  143. .RE