Skip to content

Commit e2b7eaf

Browse files
committed
Merge branch 'maint'
* maint: RelNotes-1.5.3.5: describe recent fixes merge-recursive.c: mrtree in merge() is not used before set sha1_file.c: avoid gcc signed overflow warnings Fix a small memory leak in builtin-add honor the http.sslVerify option in shell scripts
2 parents 8371d8f + e720c43 commit e2b7eaf

File tree

6 files changed

+39
-12
lines changed

6 files changed

+39
-12
lines changed

Documentation/RelNotes-1.5.3.5.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,24 @@ Fixes since v1.5.3.4
7171

7272
* "make clean" no longer deletes the configure script that ships
7373
with the git tarball, making multiple architecture builds easier.
74+
75+
* "git-remote show origin" spewed a warning message from Perl
76+
when no remote is defined for the current branch via
77+
branch.<name>.remote configuration settings.
78+
79+
* Building with NO_PERL_MAKEMAKER excessively rebuilt contents
80+
of perl/ subdirectory by rewriting perl.mak.
81+
82+
* http.sslVerify configuration settings were not used in scripted
83+
Porcelains.
84+
85+
* "git-add" leaked a bit of memory while scanning for files to add.
86+
87+
* A few workarounds to squelch false warnings from recent gcc have
88+
been added.
89+
90+
--
91+
exec >/var/tmp/1
92+
O=v1.5.3.4-55-gf120ae2
93+
echo O=`git describe refs/heads/maint`
94+
git shortlog --no-merges $O..refs/heads/maint

builtin-add.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
4444
die("pathspec '%s' did not match any files",
4545
pathspec[i]);
4646
}
47+
free(seen);
4748
}
4849

4950
static void fill_directory(struct dir_struct *dir, const char **pathspec,
@@ -135,6 +136,7 @@ static void refresh(int verbose, const char **pathspec)
135136
if (!seen[i])
136137
die("pathspec '%s' did not match any files", pathspec[i]);
137138
}
139+
free(seen);
138140
}
139141

140142
static int git_add_config(const char *var, const char *value)

git-clone.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ get_repo_base() {
2828
) 2>/dev/null
2929
}
3030

31-
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
31+
if [ -n "$GIT_SSL_NO_VERIFY" -o \
32+
"`git config --bool http.sslVerify`" = false ]; then
3233
curl_extra_args="-k"
3334
fi
3435

git-ls-remote.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ tmpdir=$tmp-d
5454

5555
case "$peek_repo" in
5656
http://* | https://* | ftp://* )
57-
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
58-
curl_extra_args="-k"
59-
fi
57+
if [ -n "$GIT_SSL_NO_VERIFY" -o \
58+
"`git config --bool http.sslVerify`" = false ]; then
59+
curl_extra_args="-k"
60+
fi
6061
if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
6162
"`git config --bool http.noEPSV`" = true ]; then
6263
curl_extra_args="${curl_extra_args} --disable-epsv"

merge-recursive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,7 @@ static int merge(struct commit *h1,
15721572
{
15731573
struct commit_list *iter;
15741574
struct commit *merged_common_ancestors;
1575-
struct tree *mrtree;
1575+
struct tree *mrtree = mrtree;
15761576
int clean;
15771577

15781578
if (show(4)) {

sha1_file.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -521,13 +521,15 @@ static int check_packed_git_idx(const char *path, struct packed_git *p)
521521
munmap(idx_map, idx_size);
522522
return error("wrong index v2 file size in %s", path);
523523
}
524-
if (idx_size != min_size) {
525-
/* make sure we can deal with large pack offsets */
526-
off_t x = 0x7fffffffUL, y = 0xffffffffUL;
527-
if (x > (x + 1) || y > (y + 1)) {
528-
munmap(idx_map, idx_size);
529-
return error("pack too large for current definition of off_t in %s", path);
530-
}
524+
if (idx_size != min_size &&
525+
/*
526+
* make sure we can deal with large pack offsets.
527+
* 31-bit signed offset won't be enough, neither
528+
* 32-bit unsigned one will be.
529+
*/
530+
(sizeof(off_t) <= 4)) {
531+
munmap(idx_map, idx_size);
532+
return error("pack too large for current definition of off_t in %s", path);
531533
}
532534
}
533535

0 commit comments

Comments
 (0)