Skip to content

Commit ddeb817

Browse files
tacker66gitster
authored andcommitted
"git prune" is safe
"git prune" is safe in case of concurrent accesses to a repository but using it in such a case is not recommended. Signed-off-by: Thomas Ackermann <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 381183f commit ddeb817

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Documentation/user-manual.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3299,17 +3299,11 @@ state, you can just prune all unreachable objects:
32993299
$ git prune
33003300
------------------------------------------------
33013301

3302-
and they'll be gone. But you should only run `git prune` on a quiescent
3302+
and they'll be gone. (You should only run `git prune` on a quiescent
33033303
repository--it's kind of like doing a filesystem fsck recovery: you
33043304
don't want to do that while the filesystem is mounted.
3305-
3306-
(The same is true of `git fsck` itself, btw, but since
3307-
`git fsck` never actually *changes* the repository, it just reports
3308-
on what it found, `git fsck` itself is never 'dangerous' to run.
3309-
Running it while somebody is actually changing the repository can cause
3310-
confusing and scary messages, but it won't actually do anything bad. In
3311-
contrast, running `git prune` while somebody is actively changing the
3312-
repository is a *BAD* idea).
3305+
`git prune` is designed not to cause any harm in such cases of concurrent
3306+
accesses to a repository but you might receive confusing or scary messages.)
33133307

33143308
[[recovering-from-repository-corruption]]
33153309
Recovering from repository corruption

0 commit comments

Comments
 (0)