KEMBAR78
Comparing 13e263095b...110a6a161d · git/git · GitHub
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: 13e263095b
Choose a base ref
...
head repository: git/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 110a6a161d
Choose a head ref
  • 5 commits
  • 7 files changed
  • 2 contributors

Commits on Jan 18, 2019

  1. Add 'human' date format

    This adds --date=human, which skips the timezone if it matches the
    current time-zone, and doesn't print the whole date if that matches (ie
    skip printing year for dates that are "this year", but also skip the
    whole date itself if it's in the last few days and we can just say what
    weekday it was).
    
    For really recent dates (same day), use the relative date stamp, while
    for old dates (year doesn't match), don't bother with time and timezone.
    
    Also add 'auto' date mode, which defaults to human if we're using the
    pager.  So you can do
    
    	git config --add log.date auto
    
    and your "git log" commands will show the human-legible format unless
    you're scripting things.
    
    Note that this time format still shows the timezone for recent enough
    events (but not so recent that they show up as relative dates).  You can
    combine it with the "-local" suffix to never show timezones for an even
    more simplified view.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Stephen P. Smith <ischis2@cox.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    torvalds authored and gitster committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    acdd377 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2019

  1. Replace the proposed 'auto' mode with 'auto:'

    In addition to adding the 'human' format, the patch added the auto
    keyword which could be used in the config file as an alternate way to
    specify the human format.  Removing 'auto' cleans up the 'human'
    format interface.
    
    Added the ability to specify mode 'foo' if the pager is being used by
    using auto:foo syntax.  Therefore, 'auto:human' date mode defaults to
    human if we're using the pager.  So you can do
    
    	git config --add log.date auto:human
    
    and your "git log" commands will show the human-legible format unless
    you're scripting things.
    
    Signed-off-by: Stephen P. Smith <ischis2@cox.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Stephen P. Smith authored and gitster committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    2fd7c22 View commit details
    Browse the repository at this point in the history
  2. Add 'human' date format documentation

    Display date and time information in a format similar to how people
    write dates in other contexts. If the year isn't specified then, the
    reader infers the date is given is in the current year.
    
    By not displaying the redundant information, the reader concentrates
    on the information that is different. The patch reports relative dates
    based on information inferred from the date on the machine running the
    git command at the time the command is executed.
    
    While the format is more useful to humans by dropping inferred
    information, there is nothing that makes it actually human. If the
    'relative' date format wasn't already implemented then using
    'relative' would have been appropriate.
    
    Signed-off-by: Stephen P. Smith <ischis2@cox.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Stephen P. Smith authored and gitster committed Jan 22, 2019
    Configuration menu
    Copy the full SHA
    038a878 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2019

  1. Add human format to test-tool

    Add the human format support to the test tool so that
    GIT_TEST_DATE_NOW can be used to specify the current time.
    
    The get_time() helper function was created and and checks the
    GIT_TEST_DATE_NOW environment variable.  If GIT_TEST_DATE_NOW is set,
    then that date is used instead of the date returned by by
    gettimeofday().
    
    All calls to gettimeofday() were replaced by calls to get_time().
    
    Renamed occurances of TEST_DATE_NOW to GIT_TEST_DATE_NOW since the
    variable is now used in the get binary and not just in the test-tool.
    
    Signed-off-by: Stephen P. Smith <ischis2@cox.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Stephen P. Smith authored and gitster committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    b841d4f View commit details
    Browse the repository at this point in the history
  2. Add human date format tests.

    When using `human` several fields are suppressed depending on the time
    difference between the reference date and the local computer date. In
    cases where the difference is less than a year, the year field is
    supppressed. If the time is less than a day; the month and year is
    suppressed.
    
    Use TEST_DATE_NOW environment variable when using the test-tool to
    hold the expected output strings constant.
    
    Signed-off-by: Stephen P. Smith <ischis2@cox.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Stephen P. Smith authored and gitster committed Jan 29, 2019
    Configuration menu
    Copy the full SHA
    110a6a1 View commit details
    Browse the repository at this point in the history
Loading