Re: Re: [Internet]Re: [PATCH v5] merge: avoid write merge state when unable to write index
- From
goldofzky@gmail.com <goldofzky@gmail.com>
- Date
- Jun 17, 2024, 09:17 UTC
- Message-ID
- <202406171717292856283@gmail.com>
- In-Reply-To
- <202406171101133354904@gmail.com>
> [2] From a usability perspective, the merge state should not be written when the index is being > written (merge conflicts are not considered failures). To avoid losing changes in the source branch,
"the merge state should not be written when the index is being written" should be: the merge state should not be written if the index write fails.
> users can only execute 'git merge --abort' and try 'git merge' again. However, if the merge state is > not written in the first place, the user only needs to retry 'git merge'.
>In other words, writing the merge state after the index write fails is meaningless and could >potentially cause Git to lose changes.