Re: [PATCH 2/3] merge: use refresh_and_write_cache

2019-08-29 Thread Thomas Gummerer
On 08/28, Martin Ågren wrote: > On Tue, 27 Aug 2019 at 12:15, Thomas Gummerer wrote: > > > struct lock_file lock = LOCK_INIT; > > const char *head_arg = "HEAD"; > > > > - hold_locked_index(&lock, LOCK_DIE_ON_ERROR); > > - refresh_cache(REFRESH_QUIET); > > - if (w

Re: [PATCH 2/3] merge: use refresh_and_write_cache

2019-08-28 Thread Martin Ågren
On Tue, 27 Aug 2019 at 12:15, Thomas Gummerer wrote: > struct lock_file lock = LOCK_INIT; > const char *head_arg = "HEAD"; > > - hold_locked_index(&lock, LOCK_DIE_ON_ERROR); > - refresh_cache(REFRESH_QUIET); > - if (write_locked_index(&the_index, &lock, > -

[PATCH 2/3] merge: use refresh_and_write_cache

2019-08-27 Thread Thomas Gummerer
Use the 'refresh_and_write_cache()' convenience function introduced in the last commit, instead of refreshing and writing the index manually in merge.c Signed-off-by: Thomas Gummerer --- builtin/merge.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/builtin/