Re: [PATCH 3/3] difftool: handle modified symlinks in dir-diff mode
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 15, 2017, 16:41 UTC
- Message-ID
- <alpine.DEB.2.20.1703151739070.3767@virtualbox>
- In-Reply-To
- <20170315065406.6739-3-davvid@gmail.com>
Hi David,
On Tue, 14 Mar 2017, David Aguilar wrote:
Show 19 quoted lines
> Detect the null object ID for symlinks in dir-diff so that difftool can > detect when symlinks are modified in the worktree. > > Previously, a null symlink object ID would crash difftool. > Handle null object IDs as unknown content that must be read from > the worktree. > > Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de> > Signed-off-by: David Aguilar <davvid@gmail.com> > --- > This was reworked a bit since the original patch. > The subject line changed, a lot of comments were added, > and the tests were made more extensive. > > This implementation is simpler since we now use a get_symlink() > function in one place and simply skip the problematic code path > that does not apply to symlinks. Existing code handles writing > the symlink content so write_symlink_file() from the original > patch is gone.
I really like this version. It is very easy to follow, the extensive comments make a lot of sense.
Well done! Dscho