269
data
270
('from' SP <committish> LF)?
271
('merge' SP <committish> LF)?
272
- (filemodify | filedelete)*
272
+ (filemodify | filedelete | filedeleteall)*
273
LF
274
....
275
292
and are not interpreted by Git. Currently they must be encoded in
293
UTF-8, as gfi does not permit other encodings to be specified.
294
295
-Zero or more `filemodify` and `filedelete` commands may be
296
-included to update the contents of the branch prior to the commit.
297
-These commands can be supplied in any order, gfi is not sensitive
298
-to pathname or operation ordering.
295
+Zero or more `filemodify`, `filedelete` and `filedeleteall` commands
296
+may be included to update the contents of the branch prior to
297
+creating the commit. These commands may be supplied in any order.
298
+However it is recommended that a `filedeleteall` command preceed
299
+all `filemodify` commands in the same commit, as `filedeleteall`
300
+wipes the branch clean (see below).
301
302
`author`
303
^^^^^^^^
461
here `<path>` is the complete path of the file to be removed.
462
See `filemodify` above for a detailed description of `<path>`.
463
464
+`filedeleteall`
465
+^^^^^^^^^^^^^^^
466
+Included in a `commit` command to remove all files (and also all
467
+directories) from the branch. This command resets the internal
468
+branch structure to have no files in it, allowing the frontend
469
+to subsequently add all interesting files from scratch.
470
+
471
+....
472
+ 'deleteall' LF
473
+....
474
+
475
+This command is extremely useful if the frontend does not know
476
+(or does not care to know) what files are currently on the branch,
477
+and therefore cannot generate the proper `filedelete` commands to
478
+update the content.
479
+
480
+Issuing a `filedeleteall` followed by the needed `filemodify`
481
+commands to set the correct content will produce the same results
482
+as sending only the needed `filemodify` and `filedelete` commands.
483
+The `filedeleteall` approach may however require gfi to use slightly
484
+more memory per active branch (less than 1 MiB for even most large
485
+projects); so frontends that can easily obtain only the affected
486
+paths for a commit are encouraged to do so.
487
+
488
`mark`
489
~~~~~~
490
Arranges for gfi to save a reference to the current object, allowing