summaryrefslogtreecommitdiff
path: root/Documentation/pretty-formats.txt
AgeCommit message (Collapse)Author
2009-03-23pretty.c: add %f format specifier to format_commit_message()Stephen Boyd
This specifier represents the sanitized and filename friendly subject line of a commit. No checks are made against the length of the string, so users may need to trim the result to the desired length if using as a filename. This is commonly used by format-patch to massage commit subjects into filenames and output patches to files. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-25Give short-hands to --pretty=tformat:%formatstringNanako Shiraishi
Allow --pretty="%h %s" (and --format="%h %s") as shorthand for an often used option --pretty=tformat:"%h %s". Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-08Move mailmap documentation into separate fileMarius Storm-Olsen
Include it directly from git-shortlog.txt, and refer to it from pretty-format.txt. Signed-off-by: Marius Storm-Olsen <marius@trolltech.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-08Change current mailmap usage to do matching on both name and email of ↵Marius Storm-Olsen
author/committer. Signed-off-by: Marius Storm-Olsen <marius@trolltech.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-18expand --pretty=format color optionsJeff King
Currently, the only colors available to --pretty=format users are red, green, and blue. Rather than expand it with a few new colors, this patch makes the usual config color syntax available, including more colors, backgrounds, and attributes. Because colors are no longer bounded to a single word (e.g., %Cred), this uses a more advanced syntax that features a beginning and end delimiter (but the old syntax still works). So you can now do: git log --pretty=tformat:'%C(yellow)%h%C(reset) %s' to emulate --pretty=oneline, or even git log --pretty=tformat:'%C(cyan magenta bold)%s%C(reset)' if you want to relive the awesomeness of 4-color CGA. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-19Documentation: sync example output with git outputMarkus Heidelberg
Don't confuse the user with old git messages. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-05add '%d' pretty format specifier to show decorationRené Scharfe
Add a new format placeholder, %d, which expands to a ref name decoration (think git log --decorate). It expands to an empty string if the commit has no decoration, or otherwise to a comma (and space) separated list of decorations, surrounded by parentheses and a leading space. Michael Dressel implemented an initial version and chose the letter d, Junio suggested to add a leading space and parentheses. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-29pretty=format: respect date format optionsJeff King
When running a command like: git log --pretty=format:%ad --date=short the date option was ignored. This patch causes it to use whatever format was specified by --date (or by --relative-date, etc), just as the non-user formats would do. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-12Add pretty format %aN which gives the author name, respecting .mailmapJohannes Schindelin
The pretty format %an does not respect .mailmap, but gives the exact author name recorded in the commit. Sometimes it is more desirable, however, to look if the email has another name mapped to it in .mailmap. This commit adds %aN (and %cN for the committer name) to do exactly that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05Documentation: be precise about which date --pretty usesNikolaus Schulz
This makes it explicit that the --pretty formats 'medium' and 'email' use the author date (and ignore the committer date). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-13document --pretty=tformat: optionJeff King
This was introduced in 4da45bef, but never documented anywhere. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-23pretty.c: add %x00 format specifier.Govind Salinas
This adds a %xXX format which inserts two hexdigits after %x as a byte value in the resulting string. This can be used to add a NUL byte or any other byte that can make machine parsing easier. It is also necessary to use fwrite to print out the data since printf will terminate if you feed it a NUL. Signed-off-by: Govind Salinas <blix@sophiasuchtig.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-14Support output ISO 8601 format datesRobin Rosenberg
Support output of full ISO 8601 style dates in e.g. git log and other places that use interpolation for formatting. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-07War on whitespaceJunio C Hamano
This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-05-14Documentation: Split description of pretty formats of commit logJakub Narebski
Split description of pretty formats into list of pretty options (--pretty and --encoding) in new file Documentation/pretty-options.txt and description of formats itself as a separate "PRETTY FORMATS" section in pretty-formats.txt While at it correct formatting a bit, to be better laid out in the resulting manpages: git-rev-list(1), git-show(1), git-log(1) and git-diff-tree(1). Those manpages now include pretty options in the same place as it was before, and description of formats just after all options. Inspired by the split into two filesdocumentation for merge strategies: Documentation/merge-options.txt and Documentation/merge-strategies.txt Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-12Add %m to '--pretty=format:'Junio C Hamano
When used with '--boundary A...B', this shows the -/</> marker you would get with --left-right option to 'git-log' family. When symmetric diff is not used, everybody is shown to be on the "right" branch. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-23pretty-formats: add 'format:<string>'Johannes Schindelin
With this patch, $ git show -s \ --pretty=format:' Ze komit %h woss%n dunn buy ze great %an' shows something like Ze komit 04c5c88 woss dunn buy ze great Junio C Hamano The supported placeholders are: '%H': commit hash '%h': abbreviated commit hash '%T': tree hash '%t': abbreviated tree hash '%P': parent hashes '%p': abbreviated parent hashes '%an': author name '%ae': author email '%ad': author date '%aD': author date, RFC2822 style '%ar': author date, relative '%at': author date, UNIX timestamp '%cn': committer name '%ce': committer email '%cd': committer date '%cD': committer date, RFC2822 style '%cr': committer date, relative '%ct': committer date, UNIX timestamp '%e': encoding '%s': subject '%b': body '%Cred': switch color to red '%Cgreen': switch color to green '%Cblue': switch color to blue '%Creset': reset color '%n': newline Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30Move commit reencoding parameter parsing to revision.cJunio C Hamano
This way, git-rev-list and git-diff-tree with --pretty can use it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-23Move --pretty options into Documentation/pretty-formats.txtChris Riddoch
Asciidoc-include it into the manuals for programs that use the --pretty command-line option, for consistency among the docs. This describes all the pretty-formats currently listed in the cmit_fmt enum in commit.h, and also briefly describes the presence and format of the 'Merge: ' line in some pretty formats. There's a hedge that limiting your view of history can affect what goes in the Merge: line, and that --abbrev/--no-abbrev do nothing to the 'raw' format. Signed-off-by: Chris Riddoch <chris@syntacticsugar.org> Signed-off-by: Junio C Hamano <junkio@cox.net>