Skip to content

Commit 512e44b

Browse files
committed
Clarify documentation of fast-import's D subcommand
The 'D' subcommand within a commit can also delete a directory recursively. This wasn't clear in the prior version of the documentation, leading to a question on the mailing list. Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent ccd7186 commit 512e44b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Documentation/git-fast-import.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,16 +481,18 @@ It is recommended that `<path>` always be encoded using UTF-8.
481481

482482
`filedelete`
483483
^^^^^^^^^^^^
484-
Included in a `commit` command to remove a file from the branch.
485-
If the file removal makes its directory empty, the directory will
484+
Included in a `commit` command to remove a file or recursively
485+
delete an entire directory from the branch. If the file or directory
486+
removal makes its parent directory empty, the parent directory will
486487
be automatically removed too. This cascades up the tree until the
487488
first non-empty directory or the root is reached.
488489

489490
....
490491
'D' SP <path> LF
491492
....
492493

493-
here `<path>` is the complete path of the file to be removed.
494+
here `<path>` is the complete path of the file or subdirectory to
495+
be removed from the branch.
494496
See `filemodify` above for a detailed description of `<path>`.
495497

496498
`filedeleteall`

0 commit comments

Comments
 (0)