mirror of
https://github.com/git/git.git
synced 2026-03-14 10:53:25 +01:00
Merge branch 'master' into next
* master: Add revspec documentation for ':path', ':[0-3]:path' and git-describe Reject hexstring longer than 40-bytes in get_short_sha1() reduce delta head inflated size git-imap-send: Strip smtp From_ header from imap message. add proper dependancies on the xdiff source
This commit is contained in:
@@ -111,7 +111,9 @@ SPECIFYING REVISIONS
|
||||
|
||||
A revision parameter typically, but not necessarily, names a
|
||||
commit object. They use what is called an 'extended SHA1'
|
||||
syntax.
|
||||
syntax. Here are various ways to spell object names. The
|
||||
ones listed near the end of this list are to name trees and
|
||||
blobs contained in a commit.
|
||||
|
||||
* The full SHA1 object name (40-byte hexadecimal string), or
|
||||
a substring of such that is unique within the repository.
|
||||
@@ -119,6 +121,9 @@ syntax.
|
||||
name the same commit object if there are no other object in
|
||||
your repository whose object name starts with dae86e.
|
||||
|
||||
* An output from `git-describe`; i.e. a closest tag, followed by a
|
||||
dash, a 'g', and an abbreviated object name.
|
||||
|
||||
* A symbolic ref name. E.g. 'master' typically means the commit
|
||||
object referenced by $GIT_DIR/refs/heads/master. If you
|
||||
happen to have both heads/master and tags/master, you can
|
||||
@@ -156,6 +161,15 @@ syntax.
|
||||
and dereference the tag recursively until a non-tag object is
|
||||
found.
|
||||
|
||||
* A suffix ':' followed by a path; this names the blob or tree
|
||||
at the given path in the tree-ish object named by the part
|
||||
before the colon.
|
||||
|
||||
* A colon, optionally followed by a stage number (0 to 3) and a
|
||||
colon, followed by a path; this names a blob object in the
|
||||
index at the given path. Missing stage number (and the colon
|
||||
that follows it) names an stage 0 entry.
|
||||
|
||||
Here is an illustration, by Jon Loeliger. Both node B and C are
|
||||
a commit parents of commit node A. Parent commits are ordered
|
||||
left-to-right.
|
||||
|
||||
2
Makefile
2
Makefile
@@ -768,6 +768,8 @@ $(LIB_FILE): $(LIB_OBJS)
|
||||
rm -f $@ && $(AR) rcs $@ $(LIB_OBJS)
|
||||
|
||||
XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o
|
||||
$(XDIFF_OBJS): xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \
|
||||
xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
|
||||
|
||||
$(XDIFF_LIB): $(XDIFF_OBJS)
|
||||
rm -f $@ && $(AR) rcs $@ $(XDIFF_OBJS)
|
||||
|
||||
@@ -1226,6 +1226,14 @@ split_msg( msg_data_t *all_msgs, msg_data_t *msg, int *ofs )
|
||||
if (msg->len < 5 || strncmp( data, "From ", 5 ))
|
||||
return 0;
|
||||
|
||||
p = strchr( data, '\n' );
|
||||
if (p) {
|
||||
p = &p[1];
|
||||
msg->len -= p-data;
|
||||
*ofs += p-data;
|
||||
data = p;
|
||||
}
|
||||
|
||||
p = strstr( data, "\nFrom " );
|
||||
if (p)
|
||||
msg->len = &p[1] - data;
|
||||
|
||||
@@ -943,7 +943,7 @@ static int packed_delta_info(struct packed_git *p,
|
||||
|
||||
if (sizep) {
|
||||
const unsigned char *data;
|
||||
unsigned char delta_head[64];
|
||||
unsigned char delta_head[20];
|
||||
unsigned long result_size;
|
||||
z_stream stream;
|
||||
int st;
|
||||
|
||||
@@ -157,7 +157,7 @@ static int get_short_sha1(const char *name, int len, unsigned char *sha1,
|
||||
char canonical[40];
|
||||
unsigned char res[20];
|
||||
|
||||
if (len < MINIMUM_ABBREV)
|
||||
if (len < MINIMUM_ABBREV || len > 40)
|
||||
return -1;
|
||||
hashclr(res);
|
||||
memset(canonical, 'x', 40);
|
||||
|
||||
Reference in New Issue
Block a user