aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-12-14 23:15:44 -0500
committerJunio C Hamano <junkio@cox.net>2006-12-15 22:29:54 -0800
commitebd124c6783da5e064963611ee17741cd173f6b5 (patch)
treed3e5ba5b8a6ef190bc1144c841105a2de24425c9 /Documentation
parent1510fea781cb0517eeba8c378964f7bc4f9577ab (diff)
downloadgit-ebd124c6783da5e064963611ee17741cd173f6b5.tar.gz
git-ebd124c6783da5e064963611ee17741cd173f6b5.tar.xz
make commit message a little more consistent and conforting
It is nicer to let the user know when a commit succeeded all the time, not only the first time. Also the commit sha1 is much more useful than the tree sha1 in this case. This patch also introduces a -q switch to supress this message as well as the summary of created/deleted files. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/core-tutorial.txt14
-rw-r--r--Documentation/diff-options.txt5
-rw-r--r--Documentation/git-commit.txt3
-rw-r--r--Documentation/tutorial-2.txt29
4 files changed, 31 insertions, 20 deletions
diff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt
index 47505aa20..1c311590c 100644
--- a/Documentation/core-tutorial.txt
+++ b/Documentation/core-tutorial.txt
@@ -336,17 +336,9 @@ $ commit=$(echo 'Initial commit' | git-commit-tree $tree)
$ git-update-ref HEAD $commit
------------------------------------------------
-which will say:
-
-----------------
-Committing initial tree 8988da15d077d4829fc51d8544c097def6644dbb
-----------------
-
-just to warn you about the fact that it created a totally new commit
-that is not related to anything else. Normally you do this only *once*
-for a project ever, and all later commits will be parented on top of an
-earlier commit, and you'll never see this "Committing initial tree"
-message ever again.
+In this case this creates a totally new commit that is not related to
+anything else. Normally you do this only *once* for a project ever, and
+all later commits will be parented on top of an earlier commit.
Again, normally you'd never actually do this by hand. There is a
helpful script called `git commit` that will do all of this for you. So
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 9cdd171af..f12082e13 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -21,6 +21,11 @@
deleted lines in decimal notation and pathname without
abbreviation, to make it more machine friendly.
+--shortstat::
+ Output only the last line of the --stat format containing total
+ number of modified files, as well as number of added and deleted
+ lines.
+
--summary::
Output a condensed summary of extended header information
such as creations, renames and mode changes.
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 97d66ef4d..0b74cd708 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -113,6 +113,9 @@ but can be used to amend a merge commit.
as well. This is usually not what you want unless you
are concluding a conflicted merge.
+-q|--quiet::
+ Supress commit summary message.
+
\--::
Do not interpret any more arguments as options.
diff --git a/Documentation/tutorial-2.txt b/Documentation/tutorial-2.txt
index 6389de5ef..8606381e6 100644
--- a/Documentation/tutorial-2.txt
+++ b/Documentation/tutorial-2.txt
@@ -22,14 +22,14 @@ defaulting to local storage area
$ echo 'hello world' > file.txt
$ git add .
$ git commit -a -m "initial commit"
-Committing initial tree 92b8b694ffb1675e5975148e1121810081dbdffe
+Created initial commit 54196cc2703dc165cbd373a65a4dcf22d50ae7f7
create mode 100644 file.txt
$ echo 'hello world!' >file.txt
$ git commit -a -m "add emphasis"
+Created commit c4d59f390b9cfd4318117afde11d601c1085f241
------------------------------------------------
-What are the 40 digits of hex that git responded to the first commit
-with?
+What are the 40 digits of hex that git responded to the commit with?
We saw in part one of the tutorial that commits have names like this.
It turns out that every object in the git history is stored under
@@ -39,13 +39,25 @@ the same data twice (since identical data is given an identical SHA1
name), and that the contents of a git object will never change (since
that would change the object's name as well).
+It is expected that the content of the commit object you created while
+following the example above generates a different SHA1 hash than
+the one shown above because the commit object records the time when
+it was created and the name of the person performing the commit.
+
We can ask git about this particular object with the cat-file
-command--just cut-and-paste from the reply to the initial commit, to
-save yourself typing all 40 hex digits:
+command. Don't copy the 40 hex digits from this example but use those
+from your own version. Note that you can shorten it to only a few
+characters to save yourself typing all 40 hex digits:
------------------------------------------------
-$ git cat-file -t 92b8b694ffb1675e5975148e1121810081dbdffe
-tree
+$ git-cat-file -t 54196cc2
+commit
+$ git-cat-file commit 54196cc2
+tree 92b8b694ffb1675e5975148e1121810081dbdffe
+author J. Bruce Fields <bfields@puzzle.fieldses.org> 1143414668 -0500
+committer J. Bruce Fields <bfields@puzzle.fieldses.org> 1143414668 -0500
+
+initial commit
------------------------------------------------
A tree can refer to one or more "blob" objects, each corresponding to
@@ -102,8 +114,7 @@ $ find .git/objects/
and the contents of these files is just the compressed data plus a
header identifying their length and their type. The type is either a
-blob, a tree, a commit, or a tag. We've seen a blob and a tree now,
-so next we should look at a commit.
+blob, a tree, a commit, or a tag.
The simplest commit to find is the HEAD commit, which we can find
from .git/HEAD: