diff options
-rw-r--r-- | Documentation/RelNotes-1.6.0.5.txt | 43 | ||||
-rw-r--r-- | builtin-fetch-pack.c | 3 | ||||
-rw-r--r-- | builtin-tag.c | 28 | ||||
-rwxr-xr-x | gitweb/gitweb.perl | 1 | ||||
-rw-r--r-- | http.c | 11 |
5 files changed, 55 insertions, 31 deletions
diff --git a/Documentation/RelNotes-1.6.0.5.txt b/Documentation/RelNotes-1.6.0.5.txt index 1dc101c6a3..a08bb96738 100644 --- a/Documentation/RelNotes-1.6.0.5.txt +++ b/Documentation/RelNotes-1.6.0.5.txt @@ -4,40 +4,53 @@ GIT v1.6.0.5 Release Notes Fixes since v1.6.0.4 -------------------- -* 'git checkout' used to crash when your HEAD was pointing at a deleted +* "git checkout" used to crash when your HEAD was pointing at a deleted branch. -* 'git checkout' from an un-checked-out state did not allow switching out +* "git checkout" from an un-checked-out state did not allow switching out of the current branch. -* 'git diff' always allowed GIT_EXTERNAL_DIFF and --no-ext-diff was no-op for +* "git diff" always allowed GIT_EXTERNAL_DIFF and --no-ext-diff was no-op for the command. -* 'git fast-export' did not export all tags. +* Giving 3 or more tree-ish to "git diff" is supposed to show the combined + diff from second and subsequent trees to the first one, but the order was + screwed up. -* 'git ls-files --with-tree=<tree>' did not work with options other +* "git fast-export" did not export all tags. + +* "git ls-files --with-tree=<tree>" did not work with options other than -c, most notably with -m. -* 'git pack-objects' did not make its best effort to honor --max-pack-size +* "git pack-objects" did not make its best effort to honor --max-pack-size option when a single first object already busted the given limit and placed many objects in a single pack. -* 'git-p4' fast import frontend was too eager to trigger its keyword expansion +* "git-p4" fast import frontend was too eager to trigger its keyword expansion logic, even on a keyword-looking string that does not have closing '$' on the same line. -* 'git push $there' when the remote $there is defined in $GIT_DIR/branches/$there +* "git push $there" when the remote $there is defined in $GIT_DIR/branches/$there behaves more like what cg-push from Cogito used to work. -* 'git tag' did not complain when given mutually incompatible set of options. +* when giving up resolving a conflicted merge, "git reset --hard" failed + to remove new paths from the working tree. -* 'make check' cannot be run without sparse; people may have meant to say - 'make test' instead, so suggest that. +* "git tag" did not complain when given mutually incompatible set of options. -* Many unsafe call to sprintf() style varargs functions are corrected. +* The message constructed in the internal editor was discarded when "git + tag -s" failed to sign the message, which was often caused by the user + not configuring GPG correctly. -* Also contains quite a few documentation updates. +* "make check" cannot be run without sparse; people may have meant to say + "make test" instead, so suggest that. + +* Internal diff machinery had a corner case performance bug that choked on + a large file with many repeated contents. --- -O=v1.6.0.4-39-g27f6496 +* "git repack" used to grab objects out of packs marked with .keep + into a new pack. +* Many unsafe call to sprintf() style varargs functions are corrected. + +* Also contains quite a few documentation updates. diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index 372bfa20a2..67fb80ec48 100644 --- a/builtin-fetch-pack.c +++ b/builtin-fetch-pack.c @@ -780,7 +780,8 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args, struct ref *ref_cpy; fetch_pack_setup(); - memcpy(&args, my_args, sizeof(args)); + if (&args != my_args) + memcpy(&args, my_args, sizeof(args)); if (args.depth > 0) { if (stat(git_path("shallow"), &st)) st.st_mtime = 0; diff --git a/builtin-tag.c b/builtin-tag.c index d339971fab..a398499891 100644 --- a/builtin-tag.c +++ b/builtin-tag.c @@ -253,6 +253,15 @@ static void write_tag_body(int fd, const unsigned char *sha1) free(buf); } +static int build_tag_object(struct strbuf *buf, int sign, unsigned char *result) +{ + if (sign && do_sign(buf) < 0) + return error("unable to sign the tag"); + if (write_sha1_file(buf->buf, buf->len, tag_type, result) < 0) + return error("unable to write tag file"); + return 0; +} + static void create_tag(const unsigned char *object, const char *tag, struct strbuf *buf, int message, int sign, unsigned char *prev, unsigned char *result) @@ -260,6 +269,7 @@ static void create_tag(const unsigned char *object, const char *tag, enum object_type type; char header_buf[1024]; int header_len; + char *path = NULL; type = sha1_object_info(object, NULL); if (type <= OBJ_NONE) @@ -279,7 +289,6 @@ static void create_tag(const unsigned char *object, const char *tag, die("tag header too big."); if (!message) { - char *path; int fd; /* write the template message before editing: */ @@ -300,9 +309,6 @@ static void create_tag(const unsigned char *object, const char *tag, "Please supply the message using either -m or -F option.\n"); exit(1); } - - unlink(path); - free(path); } stripspace(buf, 1); @@ -312,10 +318,16 @@ static void create_tag(const unsigned char *object, const char *tag, strbuf_insert(buf, 0, header_buf, header_len); - if (sign && do_sign(buf) < 0) - die("unable to sign the tag"); - if (write_sha1_file(buf->buf, buf->len, tag_type, result) < 0) - die("unable to write tag file"); + if (build_tag_object(buf, sign, result) < 0) { + if (path) + fprintf(stderr, "The tag message has been left in %s\n", + path); + exit(128); + } + if (path) { + unlink(path); + free(path); + } } struct msg_arg { diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 95988fba4a..951739210a 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -241,6 +241,7 @@ our %feature = ( # $feature{'grep'}{'override'} = 1; # and in project config gitweb.grep = 0|1; 'grep' => { + 'sub' => \&feature_grep, 'override' => 0, 'default' => [1]}, @@ -24,7 +24,7 @@ static const char *ssl_cainfo = NULL; static long curl_low_speed_limit = -1; static long curl_low_speed_time = -1; static int curl_ftp_no_epsv = 0; -static char *curl_http_proxy = NULL; +static const char *curl_http_proxy = NULL; static struct curl_slist *pragma_header; @@ -149,11 +149,8 @@ static int http_options(const char *var, const char *value, void *cb) return 0; } if (!strcmp("http.proxy", var)) { - if (curl_http_proxy == NULL) { - if (!value) - return config_error_nonbool(var); - curl_http_proxy = xstrdup(value); - } + if (curl_http_proxy == NULL) + return git_config_string(&curl_http_proxy, var, value); return 0; } @@ -309,7 +306,7 @@ void http_cleanup(void) pragma_header = NULL; if (curl_http_proxy) { - free(curl_http_proxy); + free((void *)curl_http_proxy); curl_http_proxy = NULL; } } |