ikiwiki/doc/bugs/git.pm_should_prune_remote_...

15 lines
1.1 KiB
Plaintext
Raw Normal View History

2010-09-12 17:36:28 +02:00
The _git_ module does not appear ever to prune obsolete remote branches in the _srcdir_ repository, leading to spurious errors when fetching.
2010-09-12 19:01:55 +02:00
Pruning remote branches can be done automatically with the --prune option to "git fetch" or in a separate command "git remote prune".
2010-09-12 17:38:19 +02:00
--[[blipvert]]
2010-09-12 21:56:17 +02:00
> I'll need more information than that before I add extra processing
> work to the current git commands it uses. I don't see any errors here
> from obsolete remote branches. --[[Joey]]
2010-09-13 03:44:37 +02:00
2010-09-13 03:46:22 +02:00
Suppose a remote repository contains a branch named "foo", and you fetch from it. Then, someone renames that branch to "foo/bar". The next time you fetch from that repository, you will get an error because the obsolete branch "foo" is blocking the branch "foo/bar" from being created (due to the way git stores refs for branches). Pruning gets around the problem. It doesn't really add much overhead to the fetch, and in fact it can *save* overhead since obsolete branches do consume resources (any commits they point to cannot be garbage collected). --[[blipvert]]
> Ok, so git pull --prune can be used to do everything in one command.
> [[done]] --[[Joey]]