1
0
mirror of https://github.com/git/git.git synced 2025-04-24 11:03:47 +00:00
git/builtin
Carlos Martín Nieto ed43de6ec3 fetch: honor the user-provided refspecs when pruning refs
If the user gave us refspecs on the command line, we should use those
when deciding whether to prune a ref instead of relying on the
refspecs in the config.

Previously, running

    git fetch --prune origin refs/heads/master:refs/remotes/origin/master

would delete every other ref under the origin namespace because we
were using the refspec to filter the available refs but using the
configured refspec to figure out if a ref had been deleted on the
remote. This is clearly the wrong thing to do.

Change prune_refs and get_stale_heads to simply accept a list of
references and a list of refspecs. The caller of either function needs
to decide what refspecs should be used to decide whether a ref is
stale.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-15 21:56:13 -07:00
..
2011-06-20 14:27:36 -07:00
2011-08-04 15:57:18 -07:00
2011-08-28 21:20:28 -07:00
2011-08-28 21:19:16 -07:00
2011-08-28 21:22:58 -07:00
2011-08-28 21:19:16 -07:00
2011-09-12 11:43:58 -07:00
2011-08-28 21:19:16 -07:00
2011-09-06 11:42:12 -07:00
2011-05-31 12:19:11 -07:00
2011-05-31 12:19:11 -07:00
2011-08-25 14:42:11 -07:00