[PATCH] Document the fact that commit -a is the way to go for simple operations

Subsystems: documentation, the rest

DORMANTno replies

6 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] Document the fact that commit -a is the way to go for simple operations

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:43:08

Signed-off-by: Matthieu Moy <redacted>
---
 Documentation/git-commit.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 2895225..d024c03 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -54,7 +54,8 @@ OPTIONS
 -a|--all::
 	Tell the command to automatically stage files that have
 	been modified and deleted, but new files you have not
-	told git about are not affected.
+	told git about are not affected.  You should use it for most
+        trivial operations.
 
 -c or -C <commit>::
 	Take existing commit object, and reuse the log message
-- 
1.5.1.3

[PATCH] Document git add -u introduced earlier.

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:43:08

This command was implemented, but not documented in
dfdac5d9b877641d3aad8ec49f64c2730a3487e3.

Signed-off-by: Matthieu Moy <redacted>
---
 Documentation/git-add.txt |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 755d718..ea27018 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -7,7 +7,7 @@ git-add - Add file contents to the changeset to be committed next
 
 SYNOPSIS
 --------
-'git-add' [-n] [-v] [-f] [--interactive | -i] [--] <file>...
+'git-add' [-n] [-v] [-f] [--interactive | -i] [-u] [--] <file>...
 
 DESCRIPTION
 -----------
@@ -56,6 +56,10 @@ OPTIONS
 	Add modified contents in the working tree interactively to
 	the index.
 
+-u::
+	Update all files that git already knows about. This is what
+	"git commit -a" does in preparation for making a commit.
+
 \--::
 	This option can be used to separate command-line options from
 	the list of files, (useful when filenames might be mistaken
-- 
1.5.1.3

[PATCH] Document "commit --only".

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:43:08

The documentation was there earlier, but removed by
4170a19587280eeb3663a47a6fd993910de78076.

That option being the default now, it could perhaps be actually
removed, but since it is there, and mentionned in the SYNOPSIS, it
should be actually documented.

Signed-off-by: Matthieu Moy <redacted>
---
 Documentation/git-commit.txt |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index d024c03..0bdf794 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -116,6 +116,11 @@ 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.
 
+-o|--only::
+	Commit only the files specified on the command line.
+	This format cannot be used during a merge. This is the
+	default.
+
 -q|--quiet::
 	Suppress commit summary message.
 
-- 
1.5.1.3

[PATCH] Added a reference to git-add in the documentation for git-update-index

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:43:08

Signed-off-by: Matthieu Moy <redacted>
---
 Documentation/git-update-index.txt |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index cd5e014..6cfbd9a 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -27,6 +27,9 @@ Modifies the index or directory cache. Each file mentioned is updated
 into the index and any 'unmerged' or 'needs updating' state is
 cleared.
 
+See also gitlink:git-add[1] for a more user-friendly way to do some of
+the most common operations on the index.
+
 The way "git-update-index" handles files it is told about can be modified
 using the various options:
 
@@ -306,7 +309,8 @@ The command looks at `core.ignorestat` configuration variable.  See
 
 See Also
 --------
-gitlink:git-config[1]
+gitlink:git-config[1],
+gitlink:git-add[1]
 
 
 Author
-- 
1.5.1.3

Re: [PATCH] Document the fact that commit -a is the way to go for simple operations

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:43:08

On Sun, 6 May 2007, Matthieu Moy wrote:
quoted hunk
Signed-off-by: Matthieu Moy <redacted>
---
 Documentation/git-commit.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 2895225..d024c03 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -54,7 +54,8 @@ OPTIONS
 -a|--all::
 	Tell the command to automatically stage files that have
 	been modified and deleted, but new files you have not
-	told git about are not affected.
+	told git about are not affected.  You should use it for most
+        trivial operations.
I don't think this patch is worth it.  If anything it might create more 
confusion.

There are many ways to commit without -a which still could be considered 
amongst "most trivial operations".


Nicolas

Re: [PATCH] Document "commit --only".

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:43:08

On Sun, 6 May 2007, Matthieu Moy wrote:
The documentation was there earlier, but removed by
4170a19587280eeb3663a47a6fd993910de78076.

That option being the default now, it could perhaps be actually
removed, but since it is there, and mentionned in the SYNOPSIS, it
should be actually documented.
I don't think this is a good idea either.
+-o|--only::
+	Commit only the files specified on the command line.
+	This format cannot be used during a merge. This is the
+	default.
This looks really confusing.  This is the default _only_ if files are 
specified on the command line.

IMHO I'd rather remove the option from the synopsis and flag it as 
scheduled for removal in the source instead.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help