Skip to content

push: update remote tags only with force

Chris Rorvick git 6 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest8 patches 23 repliesIn review
  2. v57 patches 8 repliesSuperseded
  3. v45 patches 3 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v35 patches11 repliesSuperseded
v25 patches3 repliesSuperseded
v11 patch4 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8push: return reject reasons as a bitsetbuiltin/push.c builtin/send-pack.c transport.c +1 more+19 -240 replies
2/8push: add advice for rejected tag referencebuiltin/push.c cache.h remote.c +2 more+25 -04 replies
3/8push: flag updatescache.h remote.c+12 -70 replies
4/8push: flag updates that require forcecache.h remote.c transport.c+12 -50 replies
5/8push: require force for refs under refs/tags/Documentation/git-push.txt builtin/push.c builtin/send-pack.c +6 more+62 -130 replies
6/8push: require force for annotated tagsDocumentation/git-push.txt remote.c t/t5516-fetch-push.sh+35 -70 replies
7/8push: clarify rejection of update to non-commit-ishremote.c+5 -00 replies
8/8push: cleanup push rules commentremote.c+17 -151 reply

Reviews trailers per patch

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

Read the v6 thread

Cover letter [PATCH v6 0/8] push: update remote tags only with force

This patch series originated in response to the following thread:

http://thread.gmane.org/gmane.comp.version-control.git/208354

I made some adjustments based on Junio's last round of feedback including a new patch reworking the "push rules" comment in remote.c. Also refined some of the log messages--nothing major. Finally, took a stab at putting something together for the release notes, see below.

Chris

Release notes:

"git push" no longer updates tags (lightweight or annotated) by default. Specifically, if the destination reference already exists and is under refs/tags/ or it points to a tag object, it is not allowed to fast- forward (unless forced using +A:B notation or by passing --force.) This is consistent with how a tag is normally thought of: a reference that does not move once defined. It also ensures a push will not inadvertently clobber an already existing tag--something that can go unnoticed if fast-forwarding is allowed.

Chris Rorvick (8):
push: return reject reasons as a bitset
push: add advice for rejected tag reference
push: flag updates
push: flag updates that require force
push: require force for refs under refs/tags/
push: require force for annotated tags
push: clarify rejection of update to non-commit-ish
push: cleanup push rules comment

 Documentation/git-push.txt |  9 ++---
 builtin/push.c             | 24 +++++++++-----
 builtin/send-pack.c        |  9 +++--
 cache.h                    |  7 +++-
 remote.c                   | 83 +++++++++++++++++++++++++++++++++++-----------
 send-pack.c                |  1 +
 t/t5516-fetch-push.sh      | 44 +++++++++++++++++++++++-
 transport-helper.c         |  6 ++++
 transport.c                | 25 ++++++++------
 transport.h                | 10 +++---
 10 files changed, 167 insertions(+), 51 deletions(-)
Signature · 1 line
1.8.0.158.g0c4328c