Skip to content

Commit 23807fa

Browse files
committed
Merge branch 'maint'
* maint: Prepare for 1.6.3.2 fix cat-file usage message and documentation fetch: report ref storage DF errors more accurately lock_ref: inform callers of unavailable ref merge-options.txt: Clarify merge --squash Conflicts: RelNotes
2 parents 3cd7388 + e57cb01 commit 23807fa

File tree

6 files changed

+68
-9
lines changed

6 files changed

+68
-9
lines changed

Documentation/RelNotes-1.6.3.2.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
GIT v1.6.3.2 Release Notes
2+
==========================
3+
4+
Fixes since v1.6.3.1
5+
--------------------
6+
7+
* A few codepaths picked up the first few bytes from an sha1[] by
8+
casting the (char *) pointer to (int *); GCC 4.4 did not like this,
9+
and aborted compilation.
10+
11+
* http-push had a small use-after-free bug.
12+
13+
* command completion code in bash did not reliably detect that we are
14+
in a bare repository.
15+
16+
* "git for-each-ref" had a segfaulting bug when dealing with a tag object
17+
created by an ancient git.
18+
19+
* Some unlink(2) failures went undiagnosed.
20+
21+
* The "recursive" merge strategy misbehaved when faced rename/delete
22+
conflicts while coming up with an intermediate merge base.
23+
24+
* GIT_TRACE mechanism segfaulted when tracing a shell-quoted aliases.
25+
26+
* "git add ." in an empty directory complained that pathspec "." did not
27+
match anything, which may be technically correct, but not useful. We
28+
silently make it a no-op now.
29+
30+
* "git format-patch -k" still added patch numbers if format.numbered
31+
configuration was set.
32+
33+
* OpenBSD also uses st_ctimspec in "struct stat", instead of "st_ctim".
34+
35+
* With NO_CROSS_DIRECTORY_HARDLINKS, "make install" can be told not to
36+
create hardlinks between $(gitexecdir)/git-$builtin_commands and
37+
$(bindir)/git.
38+
39+
* "git push" was converting OFS_DELTA pack representation into less
40+
efficient REF_DELTA representation unconditionally upon transfer,
41+
making the transferred data unnecessarily larger.
42+
43+
Many other general usability updates around help text, diagnostic messages
44+
and documentation are included as well.
45+
46+
---
47+
exec >/var/tmp/1
48+
O=v1.6.3.1-51-g2a1feb9
49+
echo O=$(git describe maint)
50+
git shortlog --no-merges $O..maint
51+

Documentation/git-cat-file.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ git-cat-file - Provide content or type and size information for repository objec
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git cat-file' [-t | -s | -e | -p | <type>] <object>
13-
'git cat-file' [--batch | --batch-check] < <list-of-objects>
12+
'git cat-file' (-t | -s | -e | -p | <type>) <object>
13+
'git cat-file' (--batch | --batch-check) < <list-of-objects>
1414

1515
DESCRIPTION
1616
-----------

Documentation/merge-options.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939

4040
--squash::
4141
Produce the working tree and index state as if a real
42-
merge happened, but do not actually make a commit or
42+
merge happened (except for the merge information),
43+
but do not actually make a commit or
4344
move the `HEAD`, nor record `$GIT_DIR/MERGE_HEAD` to
4445
cause the next `git commit` command to create a merge
4546
commit. This allows you to create a single commit on

builtin-cat-file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ static int batch_objects(int print_contents)
201201
}
202202

203203
static const char * const cat_file_usage[] = {
204-
"git cat-file [-t|-s|-e|-p|<type>] <sha1>",
205-
"git cat-file [--batch|--batch-check] < <list_of_sha1s>",
204+
"git cat-file (-t|-s|-e|-p|<type>) <object>",
205+
"git cat-file (--batch|--batch-check) < <list_of_objects>",
206206
NULL
207207
};
208208

builtin-fetch.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ static struct ref *get_ref_map(struct transport *transport,
167167
return ref_map;
168168
}
169169

170+
#define STORE_REF_ERROR_OTHER 1
171+
#define STORE_REF_ERROR_DF_CONFLICT 2
172+
170173
static int s_update_ref(const char *action,
171174
struct ref *ref,
172175
int check_old)
@@ -181,9 +184,11 @@ static int s_update_ref(const char *action,
181184
lock = lock_any_ref_for_update(ref->name,
182185
check_old ? ref->old_sha1 : NULL, 0);
183186
if (!lock)
184-
return 2;
187+
return errno == ENOTDIR ? STORE_REF_ERROR_DF_CONFLICT :
188+
STORE_REF_ERROR_OTHER;
185189
if (write_ref_sha1(lock, ref->new_sha1, msg) < 0)
186-
return 2;
190+
return errno == ENOTDIR ? STORE_REF_ERROR_DF_CONFLICT :
191+
STORE_REF_ERROR_OTHER;
187192
return 0;
188193
}
189194

@@ -386,7 +391,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
386391
}
387392
free(url);
388393
fclose(fp);
389-
if (rc & 2)
394+
if (rc & STORE_REF_ERROR_DF_CONFLICT)
390395
error("some local refs could not be updated; try running\n"
391396
" 'git remote prune %s' to remove any old, conflicting "
392397
"branches", remote_name);

refs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,8 +893,10 @@ static struct ref_lock *lock_ref_sha1_basic(const char *ref, const unsigned char
893893
* name is a proper prefix of our refname.
894894
*/
895895
if (missing &&
896-
!is_refname_available(ref, NULL, get_packed_refs(), 0))
896+
!is_refname_available(ref, NULL, get_packed_refs(), 0)) {
897+
last_errno = ENOTDIR;
897898
goto error_return;
899+
}
898900

899901
lock->lk = xcalloc(1, sizeof(struct lock_file));
900902

0 commit comments

Comments
 (0)