Re: [PATCH 16/33] diff: finish conversion for prepare_temp_file to struct object_id
- From
Stefan Beller <sbeller@google.com>
- Date
- May 31, 2017, 00:41 UTC
- Message-ID
- <CAGZ79kZsQCWkA+bSH2RSdHxiAX2KADJXqQGywmpP-t4BQYMCWw@mail.gmail.com>
- In-Reply-To
- <20170530173109.54904-17-bmwill@google.com>
On Tue, May 30, 2017 at 10:30 AM, Brandon Williams <bmwill@google.com> wrote:
> Signed-off-by: Brandon Williams <bmwill@google.com>
Up to (and including) this commit, the series looks good to me. Will continue to review this series later.
Thanks, Stefan
Show 27 quoted lines
> --- > diff.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/diff.c b/diff.c > index 084c8b2d0..a8ceeb024 100644 > --- a/diff.c > +++ b/diff.c > @@ -3030,13 +3030,13 @@ static struct diff_tempfile *prepare_temp_file(const char *name, > /* we can borrow from the file in the work tree */ > temp->name = name; > if (!one->oid_valid) > - sha1_to_hex_r(temp->hex, null_sha1); > + oid_to_hex_r(temp->hex, &null_oid); > else > oid_to_hex_r(temp->hex, &one->oid); > /* Even though we may sometimes borrow the > * contents from the work tree, we always want > * one->mode. mode is trustworthy even when > - * !(one->sha1_valid), as long as > + * !(one->oid_valid), as long as > * DIFF_FILE_VALID(one). > */ > xsnprintf(temp->mode, sizeof(temp->mode), "%06o", one->mode); > -- > 2.13.0.219.gdb65acc882-goog >