summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-01-16 09:36:47 +0700
committerJunio C Hamano <gitster@pobox.com>2012-01-16 14:53:41 -0800
commitde694d232f1a1b1fe2ca4c7549242d7ef96cf759 (patch)
treec1d87e533b08e495cfbf54e060ce0775d877ee6f /Documentation
parentc010eb63079843f73b4906e2a5a048f5c4e88610 (diff)
downloadgit-nd/commit-ignore-i-t-a.tar.gz
commit, write-tree: allow to ignore CE_INTENT_TO_ADD while writing treesnd/commit-ignore-i-t-a
Normally cache-tree will not produce trees from an index that has CE_INTENT_TO_ADD entries. This is a safe measure to avoid mis-interpreting user's intention regarding this flag. There are situations however where users want to create trees/commits regardless i-t-a entries. Allow such cases with commit.ignoreIntentToAdd for git-commit and --ignore-intent-to-add for git-write-tree. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config.txt5
-rw-r--r--Documentation/git-add.txt12
-rw-r--r--Documentation/git-write-tree.txt8
3 files changed, 22 insertions, 3 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index abeb82b2c6..10c37671c7 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -831,6 +831,11 @@ commit.template::
"{tilde}/" is expanded to the value of `$HOME` and "{tilde}user/" to the
specified user's home directory.
+commit.ignoreIntentToAdd::
+ Allow to commit the index as-is even if there are
+ intent-to-add entries (see option `-N` in linkgit:git-add[1])
+ in index.
+
credential.helper::
Specify an external helper to be called when a username or
password credential is needed; the helper may consult external
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 9c1d395722..ec548eaafc 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -123,8 +123,16 @@ subdirectories.
Record only the fact that the path will be added later. An entry
for the path is placed in the index with no content. This is
useful for, among other things, showing the unstaged content of
- such files with `git diff` and committing them with `git commit
- -a`.
+ such files with `git diff`.
++
+Paths added with this option have intent-to-add flag in index. The
+flag is removed once real content is added or updated. By default you
+cannot commit the index as-is from until this flag is removed from all
+entries (i.e. all entries have real content). See commit.ignoreIntentToAdd
+regardless the flag.
++
+Committing with `git commit -a` or with selected paths works
+regardless the config key and the flag.
--refresh::
Don't add the file(s), but only refresh their stat()
diff --git a/Documentation/git-write-tree.txt b/Documentation/git-write-tree.txt
index f22041a9dc..d511d3aef2 100644
--- a/Documentation/git-write-tree.txt
+++ b/Documentation/git-write-tree.txt
@@ -9,7 +9,7 @@ git-write-tree - Create a tree object from the current index
SYNOPSIS
--------
[verse]
-'git write-tree' [--missing-ok] [--prefix=<prefix>/]
+'git write-tree' [--missing-ok] [--ignore-intent-to-add] [--prefix=<prefix>/]
DESCRIPTION
-----------
@@ -32,6 +32,12 @@ OPTIONS
directory exist in the object database. This option disables this
check.
+--ignore-intent-to-add::
+ Normally 'git write-tree' will refuse to proceed if there are any
+ intent-to-add entries (see `-N` option in linkgit:git-add[1]).
+ This option continues to create object tree as if there are no
+ intent-to-add entries in index.
+
--prefix=<prefix>/::
Writes a tree object that represents a subdirectory
`<prefix>`. This can be used to write the tree object