Re: [PATCH 7/8] reflog_expire(): never update a reference to null_sha1

2015-02-12 Thread Michael Haggerty
On 02/09/2015 09:55 PM, Eric Sunshine wrote: On Mon, Feb 9, 2015 at 4:12 AM, Michael Haggerty mhag...@alum.mit.edu wrote: [...] But we don't want the repository in an invalid state even temporarily, and we don't want leave an invalid state if other callers of git s/want/want to/ [...]

[PATCH 7/8] reflog_expire(): never update a reference to null_sha1

2015-02-09 Thread Michael Haggerty
Currently, if --updateref is specified and the very last reflog entry is expired or deleted, the reference's value is set to 0{40}. This is an invalid state of the repository, and breaks, for example, git fsck and git for-each-ref. The only place we use --updateref in our own code is when

Re: [PATCH 7/8] reflog_expire(): never update a reference to null_sha1

2015-02-09 Thread Eric Sunshine
On Mon, Feb 9, 2015 at 4:12 AM, Michael Haggerty mhag...@alum.mit.edu wrote: Currently, if --updateref is specified and the very last reflog entry is expired or deleted, the reference's value is set to 0{40}. This is an invalid state of the repository, and breaks, for example, git fsck and git