Merge branch 'jc/push-reject-reasons'

Improve error and advice messages given locally when "git push"
refuses when it cannot compute fast-forwardness by separating these
cases from the normal "not a fast-forward; merge first and push
again" case.

* jc/push-reject-reasons:
  push: finishing touches to explain REJECT_ALREADY_EXISTS better
  push: introduce REJECT_FETCH_FIRST and REJECT_NEEDS_FORCE
  push: further simplify the logic to assign rejection reason
  push: further clean up fields of "struct ref"
This commit is contained in:
Junio C Hamano
2013-02-04 10:25:04 -08:00
11 changed files with 105 additions and 28 deletions

View File

@ -1015,10 +1015,8 @@ struct ref {
char *symref;
unsigned int
force:1,
requires_force:1,
forced_update:1,
merge:1,
nonfastforward:1,
update:1,
deletion:1;
enum {
REF_STATUS_NONE = 0,
@ -1026,6 +1024,8 @@ struct ref {
REF_STATUS_REJECT_NONFASTFORWARD,
REF_STATUS_REJECT_ALREADY_EXISTS,
REF_STATUS_REJECT_NODELETE,
REF_STATUS_REJECT_FETCH_FIRST,
REF_STATUS_REJECT_NEEDS_FORCE,
REF_STATUS_UPTODATE,
REF_STATUS_REMOTE_REJECT,
REF_STATUS_EXPECTING_REPORT