Merge branch 'cr/push-force-tag-update'

Require "-f" for push to update a tag, even if it is a fast-forward.

* cr/push-force-tag-update:
  push: allow already-exists advice to be disabled
  push: rename config variable for more general use
  push: cleanup push rules comment
  push: clarify rejection of update to non-commit-ish
  push: require force for annotated tags
  push: require force for refs under refs/tags/
  push: flag updates that require force
  push: keep track of "update" state separately
  push: add advice for rejected tag reference
  push: return reject reasons as a bitset
This commit is contained in:
Junio C Hamano
2013-01-05 23:41:34 -08:00
13 changed files with 188 additions and 60 deletions

View File

@ -1003,14 +1003,19 @@ struct ref {
unsigned char old_sha1[20];
unsigned char new_sha1[20];
char *symref;
unsigned int force:1,
unsigned int
force:1,
requires_force:1,
merge:1,
nonfastforward:1,
not_forwardable:1,
update:1,
deletion:1;
enum {
REF_STATUS_NONE = 0,
REF_STATUS_OK,
REF_STATUS_REJECT_NONFASTFORWARD,
REF_STATUS_REJECT_ALREADY_EXISTS,
REF_STATUS_REJECT_NODELETE,
REF_STATUS_UPTODATE,
REF_STATUS_REMOTE_REJECT,