From 87afe9a5ed759668e35513c44eacd2fd393ba658 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 16 Dec 2011 14:39:37 -0800 Subject: [PATCH 1/5] lf_to_crlf_filter(): tell the caller we added "\n" when draining This can only happen when the input size is multiple of the buffer size of the cascade filter (16k) and ends with an LF, but in such a case, the code forgot to tell the caller that it added the "\n" it could not add during the last round. Signed-off-by: Junio C Hamano --- convert.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/convert.c b/convert.c index c2c2c1144d..c028275c14 100644 --- a/convert.c +++ b/convert.c @@ -879,7 +879,7 @@ int is_null_stream_filter(struct stream_filter *filter) struct lf_to_crlf_filter { struct stream_filter filter; - int want_lf; + unsigned want_lf:1; }; static int lf_to_crlf_filter_fn(struct stream_filter *filter, @@ -895,8 +895,11 @@ static int lf_to_crlf_filter_fn(struct stream_filter *filter, lf_to_crlf->want_lf = 0; } - if (!input) - return 0; /* We've already dealt with the state */ + /* We are told to drain */ + if (!input) { + *osize_p -= o; + return 0; + } count = *isize_p; if (count) { @@ -931,10 +934,9 @@ static struct stream_filter_vtbl lf_to_crlf_vtbl = { static struct stream_filter *lf_to_crlf_filter(void) { - struct lf_to_crlf_filter *lf_to_crlf = xmalloc(sizeof(*lf_to_crlf)); + struct lf_to_crlf_filter *lf_to_crlf = xcalloc(1, sizeof(*lf_to_crlf)); lf_to_crlf->filter.vtbl = &lf_to_crlf_vtbl; - lf_to_crlf->want_lf = 0; return (struct stream_filter *)lf_to_crlf; } From ee0400df4eb13ea9b1ee3f03a50e479048f1780f Mon Sep 17 00:00:00 2001 From: Michael Schubert Date: Wed, 21 Dec 2011 15:56:00 +0100 Subject: [PATCH 2/5] builtin/commit: add missing '/' in help message Signed-off-by: Michael Schubert Signed-off-by: Junio C Hamano --- builtin-commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-commit.c b/builtin-commit.c index 764f4fdaac..257b5be2d2 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -93,7 +93,7 @@ static struct option builtin_commit_options[] = { OPT_CALLBACK('m', "message", &message, "MESSAGE", "specify commit message", opt_parse_m), OPT_STRING('c', "reedit-message", &edit_message, "COMMIT", "reuse and edit message from specified commit"), OPT_STRING('C', "reuse-message", &use_message, "COMMIT", "reuse message from specified commit"), - OPT_BOOLEAN(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C-c/--amend)"), + OPT_BOOLEAN(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C/-c/--amend)"), OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"), OPT_FILENAME('t', "template", &template_file, "use specified template file"), OPT_BOOLEAN('e', "edit", &edit_flag, "force edit of commit"), From 967cf9867de7c49393dfc666c941a1861d159639 Mon Sep 17 00:00:00 2001 From: Michael Schubert Date: Wed, 21 Dec 2011 13:05:27 +0100 Subject: [PATCH 3/5] builtin/log: remove redundant initialization "abbrev" and "commit_format" in struct rev_info get initialized in init_revisions - no need to reinit in cmd_log_init_defaults. Signed-off-by: Michael Schubert Signed-off-by: Junio C Hamano --- builtin/log.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index f5d4930590..56bc555d11 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -72,8 +72,6 @@ static int decorate_callback(const struct option *opt, const char *arg, int unse static void cmd_log_init_defaults(struct rev_info *rev) { - rev->abbrev = DEFAULT_ABBREV; - rev->commit_format = CMIT_FMT_DEFAULT; if (fmt_pretty) get_commit_format(fmt_pretty, rev); rev->verbose_header = 1; From a31275d6ffd35bc1c269b7136f4031abe2abee70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Wed, 21 Dec 2011 18:14:09 +0000 Subject: [PATCH 4/5] clone: the -o option has nothing to do with MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is to give an alternate instead of "origin" to the remote we are cloning from. Signed-off-by: Carlos Martín Nieto Signed-off-by: Junio C Hamano --- builtin/clone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index efe8b6cce5..86db954730 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -84,8 +84,8 @@ static struct option builtin_clone_options[] = { "directory from which templates will be used"), OPT_CALLBACK(0 , "reference", &option_reference, "repo", "reference repository", &opt_parse_reference), - OPT_STRING('o', "origin", &option_origin, "branch", - "use instead of 'origin' to track upstream"), + OPT_STRING('o', "origin", &option_origin, "name", + "use instead of 'origin' to track upstream"), OPT_STRING('b', "branch", &option_branch, "branch", "checkout instead of the remote's HEAD"), OPT_STRING('u', "upload-pack", &option_upload_pack, "path", From 2ce0edcd786b790fed580e7df56291619834d276 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 21 Dec 2011 12:02:13 -0800 Subject: [PATCH 5/5] Git 1.7.8.1 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.8.1.txt | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/RelNotes/1.7.8.1.txt b/Documentation/RelNotes/1.7.8.1.txt index 0e8bd9f5ee..33dc948b94 100644 --- a/Documentation/RelNotes/1.7.8.1.txt +++ b/Documentation/RelNotes/1.7.8.1.txt @@ -1,17 +1,38 @@ Git v1.7.8.1 Release Notes ========================== -Fixes since v1.7.8.1 --------------------- +Fixes since v1.7.8 +------------------ * In some codepaths (notably, checkout and merge), the ignore patterns recorded in $GIT_DIR/info/exclude were not honored. They now are. - * After fetching from a remote that has very long refname, the reporting - output could have corrupted by overrunning a static buffer. + * "git apply --check" did not error out when given an empty input + without any patch. + + * "git archive" mistakenly allowed remote clients to ask for commits + that are not at the tip of any ref. * "git checkout" and "git merge" treated in-tree .gitignore and exclude file in $GIT_DIR/info/ directory inconsistently when deciding which untracked files are ignored and expendable. + * LF-to-CRLF streaming filter used when checking out a large-ish blob + fell into an infinite loop with a rare input. + + * The function header pattern for files with "diff=cpp" attribute did + not consider "type *funcname(type param1,..." as the beginning of a + function. + + * The error message from "git diff" and "git status" when they fail + to inspect changes in submodules did not report which submodule they + had trouble with. + + * After fetching from a remote that has very long refname, the reporting + output could have corrupted by overrunning a static buffer. + + * "git pack-objects" avoids creating cyclic dependencies among deltas + when seeing a broken packfile that records the same object in both + the deflated form and as a delta. + Also contains minor fixes and documentation updates.