Re: [PATCH] packed_ref_store: handle a packed-refs file that is a symlink

2017-07-27 Thread Michael Haggerty
On Thu, Jul 27, 2017 at 12:40 PM, Junio C Hamano wrote: > Jeff King writes: > >> On Thu, Jul 27, 2017 at 10:19:48AM -0700, Junio C Hamano wrote: >> >>> Makes sense. Makes me wonder why we need a separate .new file >>> (instead of writing into the .lock instead), but that is a different >>> issue

Re: [PATCH] packed_ref_store: handle a packed-refs file that is a symlink

2017-07-27 Thread Junio C Hamano
Jeff King writes: > On Thu, Jul 27, 2017 at 10:19:48AM -0700, Junio C Hamano wrote: > >> Makes sense. Makes me wonder why we need a separate .new file >> (instead of writing into the .lock instead), but that is a different >> issue. > > It comes from 42dfa7ece (commit_packed_refs(): use a stagin

Re: [PATCH] packed_ref_store: handle a packed-refs file that is a symlink

2017-07-27 Thread Jeff King
On Thu, Jul 27, 2017 at 10:19:48AM -0700, Junio C Hamano wrote: > Michael Haggerty writes: > > > Change `commit_packed_refs()` to use `get_locked_file_path()` to find > > the path of the file that it should overwrite. Since that path was > > properly resolved when the lockfile was created, this

Re: [PATCH] packed_ref_store: handle a packed-refs file that is a symlink

2017-07-27 Thread Junio C Hamano
Michael Haggerty writes: > Change `commit_packed_refs()` to use `get_locked_file_path()` to find > the path of the file that it should overwrite. Since that path was > properly resolved when the lockfile was created, this restores the > pre-42dfa7ecef behavior. Because when we take a lock hold_l

Re: [PATCH] packed_ref_store: handle a packed-refs file that is a symlink

2017-07-27 Thread Michael Haggerty
Stefan, Jonathan: you're both right, the new test needs the SYMLINKS prerequisite. Junio, would you mind adding that flag? Thanks, Michael

Re: [PATCH] packed_ref_store: handle a packed-refs file that is a symlink

2017-07-26 Thread Jonathan Nieder
Hi, Michael Haggerty wrote: > One of the tricks that `contrib/workdir/git-new-workdir` plays is to > making `packed-refs` in the new workdir a symlink to the `packed-refs` > file in the original repository. Before > 42dfa7ecef ("commit_packed_refs(): use a staging file separate from > the lockfil

Re: [PATCH] packed_ref_store: handle a packed-refs file that is a symlink

2017-07-26 Thread Stefan Beller
On Wed, Jul 26, 2017 at 4:39 PM, Michael Haggerty wrote: > One of the tricks that `contrib/workdir/git-new-workdir` plays is to > making `packed-refs` in the new workdir a symlink to the `packed-refs` > file in the original repository. Before > 42dfa7ecef ("commit_packed_refs(): use a staging file

[PATCH] packed_ref_store: handle a packed-refs file that is a symlink

2017-07-26 Thread Michael Haggerty
One of the tricks that `contrib/workdir/git-new-workdir` plays is to making `packed-refs` in the new workdir a symlink to the `packed-refs` file in the original repository. Before 42dfa7ecef ("commit_packed_refs(): use a staging file separate from the lockfile", 2017-06-23), a lockfile was used as