Skip to content
  • Jeff King's avatar
    commit: print "Date" line when the user has set date · b7242b8c
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When we make a commit and the author is not the same as the
    committer (e.g., because you used "-c $commit" or
    "--author=$somebody"), we print the author's name and email
    in both the commit-message template and as part of the
    commit summary. This is a safety check to give the user a
    chance to confirm that we are doing what they expect.
    
    This patch brings the same safety for the "date" field,
    which may be set by "-c" or by using "--date".  Note that we
    explicitly do not set it for $GIT_AUTHOR_DATE, as it is
    probably not of interest when "git commit" is being fed its
    parameters by a script.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    b7242b8c