Skip to content

Commit 630d030

Browse files
committed
Improved documentation on IndexFile.add(...)
Related to #224 [ci skip]
1 parent 9d1a489 commit 630d030

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git/index/base.py

+4
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,10 @@ def add(self, items, force=True, fprogress=lambda *args: None, path_rewriter=Non
625625
strings denote a relative or absolute path into the repository pointing to
626626
an existing file, i.e. CHANGES, lib/myfile.ext, '/home/gitrepo/lib/myfile.ext'.
627627
628+
Absolute paths must start with working tree directory of this index's repository
629+
to be considered valid. For example, if it was initialized with a non-normalized path, like
630+
`/root/repo/../repo`, absolute paths to be added must start with `/root/repo/../repo`.
631+
628632
Paths provided like this must exist. When added, they will be written
629633
into the object database.
630634

0 commit comments

Comments
 (0)