Merge branch 'maint'
* maint: Fix 'git remote show' regression on empty repository in 1.5.4 Fix incorrect wording in git-merge.txt. git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options Fix random crashes in http_cleanup()
This commit is contained in:
commit
27b4070e40
@ -68,7 +68,8 @@ HOW MERGE WORKS
|
||||
---------------
|
||||
|
||||
A merge is always between the current `HEAD` and one or more
|
||||
remote branch heads, and the index file must exactly match the
|
||||
commits (usually, branch head or tag), and the index file must
|
||||
exactly match the
|
||||
tree of `HEAD` commit (i.e. the contents of the last commit) when
|
||||
it happens. In other words, `git-diff --cached HEAD` must
|
||||
report no changes.
|
||||
|
@ -94,11 +94,8 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
|
||||
transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack);
|
||||
|
||||
ref = transport_get_remote_refs(transport);
|
||||
transport_disconnect(transport);
|
||||
|
||||
if (!ref)
|
||||
if (transport_disconnect(transport))
|
||||
return 1;
|
||||
|
||||
for ( ; ref; ref = ref->next) {
|
||||
if (!check_ref_type(ref, flags))
|
||||
continue;
|
||||
|
17
git-merge.sh
17
git-merge.sh
@ -37,6 +37,7 @@ use_strategies=
|
||||
|
||||
allow_fast_forward=t
|
||||
allow_trivial_merge=t
|
||||
squash= no_commit=
|
||||
|
||||
dropsave() {
|
||||
rm -f -- "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/MERGE_MSG" \
|
||||
@ -152,17 +153,21 @@ parse_config () {
|
||||
--summary)
|
||||
show_diffstat=t ;;
|
||||
--squash)
|
||||
allow_fast_forward=t squash=t no_commit=t ;;
|
||||
test "$allow_fast_forward" = t ||
|
||||
die "You cannot combine --squash with --no-ff."
|
||||
squash=t no_commit=t ;;
|
||||
--no-squash)
|
||||
allow_fast_forward=t squash= no_commit= ;;
|
||||
squash= no_commit= ;;
|
||||
--commit)
|
||||
allow_fast_forward=t squash= no_commit= ;;
|
||||
no_commit= ;;
|
||||
--no-commit)
|
||||
allow_fast_forward=t squash= no_commit=t ;;
|
||||
no_commit=t ;;
|
||||
--ff)
|
||||
allow_fast_forward=t squash= no_commit= ;;
|
||||
allow_fast_forward=t ;;
|
||||
--no-ff)
|
||||
allow_fast_forward=false squash= no_commit= ;;
|
||||
test "$squash" != t ||
|
||||
die "You cannot combine --squash with --no-ff."
|
||||
allow_fast_forward=f ;;
|
||||
-s|--strategy)
|
||||
shift
|
||||
case " $all_strategies " in
|
||||
|
14
http.c
14
http.c
@ -284,23 +284,15 @@ void http_init(struct remote *remote)
|
||||
void http_cleanup(void)
|
||||
{
|
||||
struct active_request_slot *slot = active_queue_head;
|
||||
#ifdef USE_CURL_MULTI
|
||||
char *wait_url;
|
||||
#endif
|
||||
|
||||
while (slot != NULL) {
|
||||
struct active_request_slot *next = slot->next;
|
||||
if (slot->curl != NULL) {
|
||||
#ifdef USE_CURL_MULTI
|
||||
if (slot->in_use) {
|
||||
curl_easy_getinfo(slot->curl,
|
||||
CURLINFO_EFFECTIVE_URL,
|
||||
&wait_url);
|
||||
fprintf(stderr, "Waiting for %s\n", wait_url);
|
||||
run_active_slot(slot);
|
||||
}
|
||||
curl_multi_remove_handle(curlm, slot->curl);
|
||||
#endif
|
||||
if (slot->curl != NULL)
|
||||
curl_easy_cleanup(slot->curl);
|
||||
}
|
||||
free(slot);
|
||||
slot = next;
|
||||
}
|
||||
|
@ -419,6 +419,7 @@ test_debug 'gitk --all'
|
||||
|
||||
test_expect_success 'merge c0 with c1 (no-ff)' '
|
||||
git reset --hard c0 &&
|
||||
git config branch.master.mergeoptions "" &&
|
||||
test_tick &&
|
||||
git merge --no-ff c1 &&
|
||||
verify_merge file result.1 &&
|
||||
@ -427,6 +428,11 @@ test_expect_success 'merge c0 with c1 (no-ff)' '
|
||||
|
||||
test_debug 'gitk --all'
|
||||
|
||||
test_expect_success 'combining --squash and --no-ff is refused' '
|
||||
test_must_fail git merge --squash --no-ff c1 &&
|
||||
test_must_fail git merge --no-ff --squash c1
|
||||
'
|
||||
|
||||
test_expect_success 'merge c0 with c1 (ff overrides no-ff)' '
|
||||
git reset --hard c0 &&
|
||||
git config branch.master.mergeoptions "--no-ff" &&
|
||||
|
Loading…
Reference in New Issue
Block a user