diff options
-rw-r--r-- | Documentation/git-rebase.txt | 5 | ||||
-rwxr-xr-x | contrib/fast-import/git-p4 | 2 | ||||
-rw-r--r-- | object.h | 5 | ||||
-rw-r--r-- | remote-curl.c | 2 | ||||
-rwxr-xr-x | t/t9800-git-p4.sh | 16 |
5 files changed, 21 insertions, 9 deletions
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 671f04a281..620d50e71f 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -66,8 +66,9 @@ would be: D---E---F---G master ------------ -The latter form is just a short-hand of `git checkout topic` -followed by `git rebase master`. +*NOTE:* The latter form is just a short-hand of `git checkout topic` +followed by `git rebase master`. When rebase exits `topic` will +remain the checked-out branch. If the upstream branch already contains a change you have made (e.g., because you mailed a patch which was applied upstream), then that commit diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 2df3bb21c4..7cb479c5e1 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -1763,7 +1763,7 @@ class P4Sync(Command): changes.sort() else: - if not self.p4BranchesInGit: + if not isinstance(self, P4Clone) and not self.p4BranchesInGit: die("No remote p4 branches. Perhaps you never did \"git p4 clone\" in here."); if self.verbose: print "Getting p4 changes for %s...%s" % (', '.join(self.depotPaths), @@ -6,11 +6,6 @@ struct object_list { struct object_list *next; }; -struct object_refs { - unsigned count; - struct object *ref[FLEX_ARRAY]; /* more */ -}; - struct object_array { unsigned int nr; unsigned int alloc; diff --git a/remote-curl.c b/remote-curl.c index d0fb0a044a..775d614303 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -446,12 +446,12 @@ static int post_rpc(struct rpc_state *rpc) headers = curl_slist_append(headers, rpc->hdr_content_type); headers = curl_slist_append(headers, rpc->hdr_accept); + headers = curl_slist_append(headers, "Expect:"); if (large_request) { /* The request body is large and the size cannot be predicted. * We must use chunked encoding to send it. */ - headers = curl_slist_append(headers, "Expect:"); headers = curl_slist_append(headers, "Transfer-Encoding: chunked"); rpc->initial_buffer = 1; curl_easy_setopt(slot->curl, CURLOPT_READFUNCTION, rpc_out); diff --git a/t/t9800-git-p4.sh b/t/t9800-git-p4.sh index 1969e6b9d3..abe7c64ba9 100755 --- a/t/t9800-git-p4.sh +++ b/t/t9800-git-p4.sh @@ -37,11 +37,27 @@ test_expect_success 'add p4 files' ' echo file1 >file1 && p4 add file1 && p4 submit -d "file1" && + echo file2 >file2 && + p4 add file2 && + p4 submit -d "file2" && cd "$TRASH_DIRECTORY" ' test_expect_success 'basic git-p4 clone' ' "$GITP4" clone --dest="$git" //depot && + cd "$git" && + git log --oneline >lines && + test_line_count = 1 lines && + cd .. && + rm -rf "$git" && mkdir "$git" +' + +test_expect_success 'git-p4 clone @all' ' + "$GITP4" clone --dest="$git" //depot@all && + cd "$git" && + git log --oneline >lines && + test_line_count = 2 lines && + cd .. && rm -rf "$git" && mkdir "$git" ' |