mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
Merge branch 'maint'
* maint: GIT 1.5.0.2 git-remote: support remotes with a dot in the name Documentation: describe "-f/-t/-m" options to "git-remote add" diff --cc: fix display of symlink conflicts during a merge.
This commit is contained in:
commit
8807d321af
|
@ -6,6 +6,14 @@ Fixes since v1.5.0.1
|
|||
|
||||
* Bugfixes
|
||||
|
||||
- Automated merge conflict handling when changes to symbolic
|
||||
links conflicted were completely broken. The merge-resolve
|
||||
strategy created a regular file with conflict markers in it
|
||||
in place of the symbolic link. The default strategy,
|
||||
merge-recursive was even more broken. It removed the path
|
||||
that was pointed at by the symbolic link. Both of these
|
||||
problems have been fixed.
|
||||
|
||||
- 'git diff maint master next' did not correctly give combined
|
||||
diff across three trees.
|
||||
|
||||
|
@ -39,21 +47,19 @@ Fixes since v1.5.0.1
|
|||
impossible to repack after accumulating many (small) packs
|
||||
in the repository.
|
||||
|
||||
- 'git-diff' to review the combined diff during a conflicted
|
||||
merge were not reading the working tree version correctly
|
||||
when changes to a symbolic link conflicted. It should have
|
||||
read the data using readlink(2) but read from the regular
|
||||
file the symbolic link pointed at.
|
||||
|
||||
- 'git-remote' did not like period in a remote's name.
|
||||
|
||||
* Documentation updates
|
||||
|
||||
- added and clarified core.bare, core.legacyheaders configurations.
|
||||
|
||||
- updated "git-clone --depth" documentation.
|
||||
|
||||
|
||||
* Assorted git-gui fixes.
|
||||
|
||||
|
||||
--
|
||||
exec >/var/tmp/1
|
||||
O=v1.5.0.1-35-gffa84ff
|
||||
echo O=`git describe maint`
|
||||
git shortlog --no-merges $O..maint
|
||||
|
||||
#Local Variables:
|
||||
#mode: text
|
||||
#End:
|
||||
|
|
|
@ -32,6 +32,19 @@ subcommands are available to perform operations on the remotes.
|
|||
Adds a remote named <name> for the repository at
|
||||
<url>. The command `git fetch <name>` can then be used to create and
|
||||
update remote-tracking branches <name>/<branch>.
|
||||
+
|
||||
With `-f` option, `git fetch <name>` is run immediately after
|
||||
the remote information is set up.
|
||||
+
|
||||
With `-t <branch>` option, instead of the default glob
|
||||
refspec for the remote to track all branches under
|
||||
`$GIT_DIR/remotes/<name>/`, a refspec to track only `<branch>`
|
||||
is created. You can give more than one `-t <branch>` to track
|
||||
multiple branche without grabbing all branches.
|
||||
+
|
||||
With `-m <master>` option, `$GIT_DIR/remotes/<name>/HEAD` is set
|
||||
up to point at remote's `<master>` branch instead of whatever
|
||||
branch the `HEAD` at the remote repository actually points at.
|
||||
|
||||
'show'::
|
||||
|
||||
|
|
|
@ -678,9 +678,25 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
|
|||
else {
|
||||
/* Used by diff-tree to read from the working tree */
|
||||
struct stat st;
|
||||
int fd;
|
||||
if (0 <= (fd = open(elem->path, O_RDONLY)) &&
|
||||
!fstat(fd, &st)) {
|
||||
int fd = -1;
|
||||
|
||||
if (lstat(elem->path, &st) < 0)
|
||||
goto deleted_file;
|
||||
|
||||
if (S_ISLNK(st.st_mode)) {
|
||||
int len = st.st_size;
|
||||
result_size = len;
|
||||
result = xmalloc(len + 1);
|
||||
if (result_size != readlink(elem->path, result, len)) {
|
||||
error("readlink(%s): %s", elem->path,
|
||||
strerror(errno));
|
||||
return;
|
||||
}
|
||||
result[len] = 0;
|
||||
elem->mode = canon_mode(st.st_mode);
|
||||
}
|
||||
else if (0 <= (fd = open(elem->path, O_RDONLY)) &&
|
||||
!fstat(fd, &st)) {
|
||||
int len = st.st_size;
|
||||
int sz = 0;
|
||||
|
||||
|
@ -698,11 +714,12 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
|
|||
result[len] = 0;
|
||||
}
|
||||
else {
|
||||
/* deleted file */
|
||||
deleted_file:
|
||||
result_size = 0;
|
||||
elem->mode = 0;
|
||||
result = xcalloc(1, 1);
|
||||
}
|
||||
|
||||
if (0 <= fd)
|
||||
close(fd);
|
||||
}
|
||||
|
|
16
diff-lib.c
16
diff-lib.c
|
@ -41,17 +41,27 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed)
|
|||
|
||||
path_len = ce_namelen(ce);
|
||||
|
||||
dpath = xmalloc (combine_diff_path_size (5, path_len));
|
||||
dpath = xmalloc(combine_diff_path_size(5, path_len));
|
||||
dpath->path = (char *) &(dpath->parent[5]);
|
||||
|
||||
dpath->next = NULL;
|
||||
dpath->len = path_len;
|
||||
memcpy(dpath->path, ce->name, path_len);
|
||||
dpath->path[path_len] = '\0';
|
||||
dpath->mode = 0;
|
||||
hashclr(dpath->sha1);
|
||||
memset(&(dpath->parent[0]), 0,
|
||||
sizeof(struct combine_diff_parent)*5);
|
||||
sizeof(struct combine_diff_parent)*5);
|
||||
|
||||
if (lstat(ce->name, &st) < 0) {
|
||||
if (errno != ENOENT && errno != ENOTDIR) {
|
||||
perror(ce->name);
|
||||
continue;
|
||||
}
|
||||
if (silent_on_removed)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
dpath->mode = canon_mode(st.st_mode);
|
||||
|
||||
while (i < entries) {
|
||||
struct cache_entry *nce = active_cache[i];
|
||||
|
|
Loading…
Reference in a new issue