X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/adfe73de439162ec3dca344573409fb89a8909ce..cd7eb3e62572f14f52a7bced4e8aea946368ccff:/doc/bugs/git.pm_should_prune_remote_branches_when_fetching.mdwn diff --git a/doc/bugs/git.pm_should_prune_remote_branches_when_fetching.mdwn b/doc/bugs/git.pm_should_prune_remote_branches_when_fetching.mdwn index 4f42b082f..5dc4250e3 100644 --- a/doc/bugs/git.pm_should_prune_remote_branches_when_fetching.mdwn +++ b/doc/bugs/git.pm_should_prune_remote_branches_when_fetching.mdwn @@ -3,3 +3,12 @@ The _git_ module does not appear ever to prune obsolete remote branches in the _ Pruning remote branches can be done automatically with the --prune option to "git fetch" or in a separate command "git remote prune". --[[blipvert]] + +> 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]] + +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]]