Skip to content

teach fetch --prune

Jay Soffian git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3remote: refactor some logic into get_stale_heads()builtin-remote.c remote.c remote.h+51 -240 replies
2/3builtin-fetch: add --dry-run optionbuiltin-fetch.c+7 -30 replies
3/3builtin-fetch: add --prune optionbuiltin-fetch.c+21 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH/RFC 0/3] teach fetch --prune

This is just a start so I can get some feedback. Some things still missing:

1) "git remote prune <remote>" calls warn_dangling_symref(), but "git fetch --prune" does not. I ran out of time tonight to refactor warn_dangling_symref() to do something more intelligent than just spew to stdout (which doesn't get along with fetch, which spews to stderr...).

2) Perhaps "git remote update --prune" should be refactored to call "git fetch --prune". If so, then fetch should gain a "--prune-only" option so that "git remote prune" can just call "got fetch --prune-only".

3) Perhaps add a config option for users who wish to prune by default.

Thoughts, comments, flames?

Jay Soffian (3):
remote: refactor some logic into get_stale_heads()
builtin-fetch: add --dry-run option
builtin-fetch: add --prune option

 builtin-fetch.c  |   30 +++++++++++++++++++++++++++---
 builtin-remote.c |   32 ++++++++------------------------
 remote.c         |   40 ++++++++++++++++++++++++++++++++++++++++
 remote.h         |    3 +++
 4 files changed, 78 insertions(+), 27 deletions(-)