Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 54b469b9e9
Choose a base ref
...
head repository: git/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0b691d8685
Choose a head ref
  • 7 commits
  • 7 files changed
  • 1 contributor

Commits on Dec 9, 2018

  1. doc: group pretty-format.txt placeholders descriptions

    The placeholders can be grouped into three kinds:
     * literals
     * affecting formatting of later placeholders
     * expanding to information in commit
    
    Also change the list to a definition list (using '::')
    
    Signed-off-by: Anders Waldenborg <anders@0x63.nu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    wanders authored and gitster committed Dec 9, 2018
    Configuration menu
    Copy the full SHA
    4261775 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2019

  1. pretty: allow %(trailers) options with explicit value

    In addition to old %(trailers:only) it is now allowed to write
    %(trailers:only=yes)
    
    By itself this only gives (the not quite so useful) possibility to have
    users change their mind in the middle of a formatting
    string (%(trailers:only=true,only=false)). However, it gives users the
    opportunity to override defaults from future options.
    
    Signed-off-by: Anders Waldenborg <anders@0x63.nu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    wanders authored and gitster committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    4f732e0 View commit details
    Browse the repository at this point in the history
  2. pretty: single return path in %(trailers) handling

    No functional change intended.
    
    This change may not seem useful on its own, but upcoming commits will do
    memory allocation in there, and a single return path makes deallocation
    easier.
    
    Signed-off-by: Anders Waldenborg <anders@0x63.nu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    wanders authored and gitster committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    3e3f347 View commit details
    Browse the repository at this point in the history
  3. pretty: allow showing specific trailers

    Adds a new "key=X" option to "%(trailers)" which will cause it to only
    print trailer lines which match any of the specified keys.
    
    Signed-off-by: Anders Waldenborg <anders@0x63.nu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    wanders authored and gitster committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    250bea0 View commit details
    Browse the repository at this point in the history
  4. pretty: add support for "valueonly" option in %(trailers)

    With the new "key=" option to %(trailers) it often makes little sense to
    show the key, as it by definition already is knows which trailer is
    printed there. This new "valueonly" option makes it omit the key when
    printing trailers.
    
    E.g.:
     $ git show -s --pretty='%s%n%(trailers:key=Signed-off-by,valueonly)' aaaa881
    will show:
     > upload-pack: fix broken if/else chain in config callback
     > Jeff King <peff@peff.net>
     > Junio C Hamano <gitster@pobox.com>
    
    Signed-off-by: Anders Waldenborg <anders@0x63.nu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    wanders authored and gitster committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    d9b936d View commit details
    Browse the repository at this point in the history
  5. strbuf: separate callback for strbuf_expand:ing literals

    Expanding '%n' and '%xNN' is generic functionality, so extract that from
    the pretty.c formatter into a callback that can be reused.
    
    No functional change intended
    
    Signed-off-by: Anders Waldenborg <anders@0x63.nu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    wanders authored and gitster committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    fd2015b View commit details
    Browse the repository at this point in the history
  6. pretty: add support for separator option in %(trailers)

    By default trailer lines are terminated by linebreaks ('\n'). By
    specifying the new 'separator' option they will instead be separated by
    user provided string and have separator semantics rather than terminator
    semantics. The separator string can contain the literal formatting codes
    %n and %xNN allowing it to be things that are otherwise hard to type
    such as %x00, or comma and end-parenthesis which would break parsing.
    
    E.g:
     $ git log --pretty='%(trailers:key=Reviewed-by,valueonly,separator=%x00)'
    
    Signed-off-by: Anders Waldenborg <anders@0x63.nu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    wanders authored and gitster committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    0b691d8 View commit details
    Browse the repository at this point in the history
Loading