Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: man/src/git-footers.txt

Issue 521033002: Added git footers tool to parse conventional metadata from git commits (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Review comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « man/src/_git-footers_desc.helper.txt ('k') | man/src/git-footers.demo.1.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: man/src/git-footers.txt
diff --git a/man/src/git-footers.txt b/man/src/git-footers.txt
new file mode 100644
index 0000000000000000000000000000000000000000..2623581f20c0995de76f2995fc8d7ce9586c1e64
--- /dev/null
+++ b/man/src/git-footers.txt
@@ -0,0 +1,71 @@
+git-freeze(1)
+=============
+
+NAME
+----
+git-footers -
+include::_git-footers_desc.helper.txt[]
+
+SYNOPSIS
+--------
+[verse]
+'git footers' [--key FOOTER] REF
+'git footers' [--position | --position-ref | --position-num] REF
+
+DESCRIPTION
+-----------
+
+`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:
+
+ This is a fancy commit message.
+
+ Cr-Commit-Position: refs/heads/master@{#292272}
+ Tech-Debt-Introduced: 17 nanoMSOffices
+
+`git footers` knows how to extract this information.
+
+Footers are order-independent and can appear more than once. Thus they are
+treated as a multimap.
+
+OPTIONS
+-------
+
+If no options are given, all footers are printed, with their names
+case-normalized.
+
+--key FOOTER::
+ 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.
+
+--position::
+ Extract the Chrome commit position from the footers. This first attempts
+ to get the value of the `Cr-Commit-Position` footer. If that doesn't exist
+ then it tries a heuristic based on `Git-Svn-Id`. Output is in one of the
+ following forms:
+
+ refs/heads/master@{#292272}
+ refs/branch-heads/branchname
+
+--position-num::
+ Extracts and prints the Chrome commit position number only (292272 in the
+ example above). Exits with an error if one cannot be found.
+
+--position-ref::
+ Extracts and prints the Chrome commit position ref name only
+ (`ref/heads/master` or `refs/branch-heads/branchname` in the example above).
+
+
+EXAMPLE
+-------
+demo:1[]
+
+SEE ALSO
+--------
+linkgit:git-number[1]
+
+include::_footer.txt[]
+
+// vim: ft=asciidoc:
« no previous file with comments | « man/src/_git-footers_desc.helper.txt ('k') | man/src/git-footers.demo.1.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698