Re: [PATCH] merge-recursive: handle file mode and links similarly to file content
- From
Clemens Buchacher <drizzd@aon.at>
- Date
- Mar 14, 2008, 10:13 UTC
- Message-ID
- <20080314101349.GB23145@localhost>
- In-Reply-To
- <20080314092105.GA18683@localhost>
On Fri, Mar 14, 2008 at 10:21:05AM +0100, Clemens Buchacher wrote:
Show 16 quoted lines
> @@ -1051,14 +1066,11 @@ static struct merge_file_info merge_file(struct diff_filespec *o,
>
> free(result_buf.ptr);
> result.clean = (merge_status == 0);
> - } else if (S_ISGITLINK(a->mode)) {
> + result.merge = 1;
> + } else if (S_ISGITLINK(a->mode) || S_ISLNK(a->mode)) {
> + hashcpy(result.sha, b->sha1);
> result.clean = 0;
> - hashcpy(result.sha, a->sha1);
> - } else if (S_ISLNK(a->mode)) {
> - hashcpy(result.sha, a->sha1);
> -
> - if (!sha_eq(a->sha1, b->sha1))
> - result.clean = 0;
> + result.merge = 1;To clarify: The above two cases don't need to be handled separately any more, because equal sha1s are already handled above.
Clemens