зеркало из https://github.com/microsoft/git.git
Merge branch 'maint'
* maint: Update draft release notes for 1.6.1.1 builtin-fsck: fix off by one head count t5540: clarify that http-push does not handle packed-refs on the remote http-push: when making directories, have a trailing slash in the path name http-push: fix off-by-path_len Documentation: let asciidoc align related options githooks.txt: add missing word builtin-commit.c: do not remove COMMIT_EDITMSG
This commit is contained in:
Коммит
58f37f3c07
|
@ -9,9 +9,14 @@ Fixes since v1.6.1
|
|||
|
||||
* "git checkout $tree" did not trigger an error.
|
||||
|
||||
* "git commit" tried to remove COMMIT_EDITMSG from the work tree by mistake.
|
||||
|
||||
* "git describe --all" complained when a commit is described with a tag,
|
||||
which was nonsense.
|
||||
|
||||
* "git fsck branch" did not work as advertised; instead it behaved the same
|
||||
way as "git fsck".
|
||||
|
||||
* "git log --pretty=format:%s" did not handle a multi-line subject the
|
||||
same way as built-in log listers (i.e. shortlog, --pretty=oneline, etc.)
|
||||
|
||||
|
@ -38,7 +43,7 @@ Other documentation updates.
|
|||
|
||||
---
|
||||
exec >/var/tmp/1
|
||||
O=v1.6.1-47-g914186a
|
||||
O=v1.6.1-60-g78f111e
|
||||
echo O=$(git describe maint)
|
||||
git shortlog --no-merges $O..maint
|
||||
|
||||
|
|
|
@ -21,7 +21,10 @@ OPTIONS
|
|||
-------
|
||||
include::diff-options.txt[]
|
||||
|
||||
-1 -2 -3 or --base --ours --theirs, and -0::
|
||||
-1 --base::
|
||||
-2 --ours::
|
||||
-3 --theirs::
|
||||
-0::
|
||||
Diff against the "base" version, "our branch" or "their
|
||||
branch" respectively. With these options, diffs for
|
||||
merged entries are not shown.
|
||||
|
|
|
@ -90,7 +90,7 @@ This hook is invoked by 'git-commit' right after preparing the
|
|||
default log message, and before the editor is started.
|
||||
|
||||
It takes one to three parameters. The first is the name of the file
|
||||
that the commit log message. The second is the source of the commit
|
||||
that contains the commit log message. The second is the source of the commit
|
||||
message, and can be: `message` (if a `-m` or `-F` option was
|
||||
given); `template` (if a `-t` option was given or the
|
||||
configuration option `commit.template` is set); `merge` (if the
|
||||
|
|
|
@ -624,7 +624,6 @@ static int prepare_to_commit(const char *index_file, const char *prefix)
|
|||
if (!commitable && !in_merge && !allow_empty &&
|
||||
!(amend && is_a_merge(head_sha1))) {
|
||||
run_status(stdout, index_file, prefix, 0);
|
||||
unlink(commit_editmsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -628,7 +628,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
|
|||
}
|
||||
|
||||
heads = 0;
|
||||
for (i = 1; i < argc; i++) {
|
||||
for (i = 0; i < argc; i++) {
|
||||
const char *arg = argv[i];
|
||||
if (!get_sha1(arg, head_sha1)) {
|
||||
struct object *obj = lookup_object(head_sha1);
|
||||
|
|
15
http-push.c
15
http-push.c
|
@ -1201,7 +1201,8 @@ static struct remote_lock *lock_remote(const char *path, long timeout)
|
|||
/* Make sure leading directories exist for the remote ref */
|
||||
ep = strchr(url + strlen(remote->url) + 1, '/');
|
||||
while (ep) {
|
||||
*ep = 0;
|
||||
char saved_character = ep[1];
|
||||
ep[1] = '\0';
|
||||
slot = get_active_slot();
|
||||
slot->results = &results;
|
||||
curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
|
||||
|
@ -1223,7 +1224,7 @@ static struct remote_lock *lock_remote(const char *path, long timeout)
|
|||
free(url);
|
||||
return NULL;
|
||||
}
|
||||
*ep = '/';
|
||||
ep[1] = saved_character;
|
||||
ep = strchr(ep + 1, '/');
|
||||
}
|
||||
|
||||
|
@ -1434,10 +1435,8 @@ static void handle_remote_ls_ctx(struct xml_ctx *ctx, int tag_closed)
|
|||
}
|
||||
if (path) {
|
||||
path += remote->path_len;
|
||||
ls->dentry_name = xstrdup(path);
|
||||
}
|
||||
ls->dentry_name = xmalloc(strlen(path) -
|
||||
remote->path_len + 1);
|
||||
strcpy(ls->dentry_name, path + remote->path_len);
|
||||
} else if (!strcmp(ctx->name, DAV_PROPFIND_COLLECTION)) {
|
||||
ls->dentry_flags |= IS_DIR;
|
||||
}
|
||||
|
@ -1448,6 +1447,12 @@ static void handle_remote_ls_ctx(struct xml_ctx *ctx, int tag_closed)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* NEEDSWORK: remote_ls() ignores info/refs on the remote side. But it
|
||||
* should _only_ heed the information from that file, instead of trying to
|
||||
* determine the refs from the remote file system (badly: it does not even
|
||||
* know about packed-refs).
|
||||
*/
|
||||
static void remote_ls(const char *path, int flags,
|
||||
void (*userFunc)(struct remote_ls_ctx *ls),
|
||||
void *userData)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
ServerName dummy
|
||||
PidFile httpd.pid
|
||||
DocumentRoot www
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
CustomLog access.log common
|
||||
ErrorLog error.log
|
||||
|
||||
<IfDefine SSL>
|
||||
|
|
|
@ -51,17 +51,29 @@ test_expect_success 'clone remote repository' '
|
|||
git clone $HTTPD_URL/test_repo.git test_repo_clone
|
||||
'
|
||||
|
||||
test_expect_failure 'push to remote repository' '
|
||||
test_expect_failure 'push to remote repository with packed refs' '
|
||||
cd "$ROOT_PATH"/test_repo_clone &&
|
||||
: >path2 &&
|
||||
git add path2 &&
|
||||
test_tick &&
|
||||
git commit -m path2 &&
|
||||
HEAD=$(git rev-parse --verify HEAD) &&
|
||||
git push &&
|
||||
[ -f "$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git/refs/heads/master" ]
|
||||
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
|
||||
test $HEAD = $(git rev-parse --verify HEAD))
|
||||
'
|
||||
|
||||
test_expect_failure 'create and delete remote branch' '
|
||||
test_expect_success ' push to remote repository with unpacked refs' '
|
||||
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
|
||||
rm packed-refs &&
|
||||
git update-ref refs/heads/master \
|
||||
0c973ae9bd51902a28466f3850b543fa66a6aaf4) &&
|
||||
git push &&
|
||||
(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
|
||||
test $HEAD = $(git rev-parse --verify HEAD))
|
||||
'
|
||||
|
||||
test_expect_success 'create and delete remote branch' '
|
||||
cd "$ROOT_PATH"/test_repo_clone &&
|
||||
git checkout -b dev &&
|
||||
: >path3 &&
|
||||
|
@ -76,6 +88,12 @@ test_expect_failure 'create and delete remote branch' '
|
|||
test_must_fail git show-ref --verify refs/remotes/origin/dev
|
||||
'
|
||||
|
||||
test_expect_success 'MKCOL sends directory names with trailing slashes' '
|
||||
|
||||
! grep "\"MKCOL.*[^/] HTTP/[^ ]*\"" < "$HTTPD_ROOT_PATH"/access.log
|
||||
|
||||
'
|
||||
|
||||
stop_httpd
|
||||
|
||||
test_done
|
||||
|
|
Загрузка…
Ссылка в новой задаче