Re: Git Questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 2007 August 20, Tom Schinckel wrote:

> The reason I want to do that is so I can set up blind commits that I can
> add in a anacron job or something. The information about the files isn't
> really important

The point still stands though - what you are asking is to put information the 
commit message that is available outside of the commit message anyway - so 
why bother?  If you really don't care about a commit message, then just use

 git commit -a -m ""

This commits all (-a) changed files and uses an empty commit message (-m "").

Then later, if you wanted to see a summary of a particular commit

 git show --stat <commit hash>

For example, in my currently checked out git repository:

$ git show --stat HEAD
commit 83b3df7d582429d9036f34d2c95abfff7bf0ab24
Author: Junio C Hamano <gitster@xxxxxxxxx>
Date:   Fri Jul 27 23:51:45 2007 -0700

    git-stash apply --index: optimize postprocessing
    
    Originally, "apply --index" codepath was bolted on to the
    "update working tree files and index, but then revert the
    changes we make to the index except for added files so that we
    do not forget about them" codepath, almost as an afterthought.
    Because "apply --index" first prepares the final index state
    upfront, "revert except the added paths" postprocessing does not
    have to be done.
    
    Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>

 git-stash.sh |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

In particular note the summary at the bottom - that's not stored in the commit 
message, but git is perfectly capably of telling you all about what files 
changed.  No need to put git-status in the log message as well.



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@xxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux