git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git Questions

From
APAndy Parkins <andyparkins@gmail.com>
Date
Aug 20, 2007, 12:46 UTC
Message-ID
<200708201346.21557.andyparkins@gmail.com>
In-Reply-To
<1187612156.11595.17.camel@tom-desktop>
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@pobox.com>
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@pobox.com>
 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@gmail.com
Previous: Tom SchinckelNext: David Tweed
Message 5 of 9 in “Git Questions”
  1. Tom SchinckelAug 20, 2007
  2. Jeff KingAug 20, 2007
  3. David KågedalAug 20, 2007
  4. Tom SchinckelAug 20, 2007
  5. Andy ParkinsAug 20, 2007
  6. David TweedAug 20, 2007
  7. Jan HudecAug 20, 2007
  8. Matthieu MoyAug 20, 2007
  9. David TweedAug 20, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.