Re: [PATCH] git-apply: apply submodule changes
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 10, 2007, 12:39 UTC
- Message-ID
- <Pine.LNX.4.64.0708101337510.21857@racer.site>
- In-Reply-To
- <20070810093049.GA868MdfPADPa@greensroom.kotnet.org>
Hi,
On Fri, 10 Aug 2007, Sven Verdoolaege wrote:
Show 11 quoted lines
> @@ -2387,7 +2405,9 @@ static void add_index_file(const char *path, unsigned mode, void *buf, unsigned
> die("unable to stat newly created file %s", path);
> fill_stat_cache_info(ce, &st);
> }
> - if (write_sha1_file(buf, size, blob_type, ce->sha1) < 0)
> + if (S_ISGITLINK(mode))
> + get_sha1_hex(buf + strlen("Subproject commit "), ce->sha1);
> + else if (write_sha1_file(buf, size, blob_type, ce->sha1) < 0)
> die("unable to create backing store for newly created file %s", path);
> if (add_cache_entry(ce, ADD_CACHE_OK_TO_ADD) < 0)
> die("unable to add cache entry for %s", path);I guess that you need to catch an error from get_sha1_hex(), too.
I hope it is not to much to ask for a patch to t7400 to show what this patch fixes?
Ciao, Dscho