File tree Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -70,10 +70,10 @@ enum XML_Status {
70
70
#define LOCK_REFRESH 30
71
71
72
72
/* Remember to update object flag allocation in object.h */
73
- #define LOCAL (1u<<16 )
74
- #define REMOTE (1u<<17 )
75
- #define FETCHING (1u<<18 )
76
- #define PUSHING (1u<<19 )
73
+ #define LOCAL (1u<<11 )
74
+ #define REMOTE (1u<<12 )
75
+ #define FETCHING (1u<<13 )
76
+ #define PUSHING (1u<<14 )
77
77
78
78
/* We allow "recursive" symbolic refs. Only within reason, though */
79
79
#define MAXDEPTH 5
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ struct object_array {
66
66
* builtin/blame.c: 12-13
67
67
* bisect.c: 16
68
68
* bundle.c: 16
69
- * http-push.c: 16 -----19
69
+ * http-push.c: 11 -----14
70
70
* commit-graph.c: 15
71
71
* commit-reach.c: 16-----19
72
72
* sha1-name.c: 20
Original file line number Diff line number Diff line change @@ -126,6 +126,22 @@ test_expect_success 'create and delete remote branch' '
126
126
test_must_fail git show-ref --verify refs/remotes/origin/dev
127
127
'
128
128
129
+ test_expect_success ' non-force push fails if not up to date' '
130
+ git init --bare "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo_conflict.git &&
131
+ git -C "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo_conflict.git update-server-info &&
132
+ git clone $HTTPD_URL/dumb/test_repo_conflict.git "$ROOT_PATH"/c1 &&
133
+ git clone $HTTPD_URL/dumb/test_repo_conflict.git "$ROOT_PATH"/c2 &&
134
+ test_commit -C "$ROOT_PATH/c1" path1 &&
135
+ git -C "$ROOT_PATH/c1" push origin HEAD &&
136
+ git -C "$ROOT_PATH/c2" pull &&
137
+ test_commit -C "$ROOT_PATH/c1" path2 &&
138
+ git -C "$ROOT_PATH/c1" push origin HEAD &&
139
+ test_commit -C "$ROOT_PATH/c2" path3 &&
140
+ git -C "$ROOT_PATH/c1" log --graph --all &&
141
+ git -C "$ROOT_PATH/c2" log --graph --all &&
142
+ test_must_fail git -C "$ROOT_PATH/c2" push origin HEAD
143
+ '
144
+
129
145
test_expect_success ' MKCOL sends directory names with trailing slashes' '
130
146
131
147
! grep "\"MKCOL.*[^/] HTTP/[^ ]*\"" < "$HTTPD_ROOT_PATH"/access.log
You can’t perform that action at this time.
0 commit comments