[PATCH] potential fix for nmbug merge problems
--- scripts/nmbug | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) This seems to fix the problems with merges failing on dirty indexes. I didn't have time to trace through all of the ramifications, but it seems to me by doing a merge with the default index, we are getting some kind of random state (or maybe the state of the last merge). I'll have to road test this a bit more to be sure it's a fix, but maybe you can think about whether it's the righ thing (TM) to do in any case. diff --git a/scripts/nmbug b/scripts/nmbug index 77bec64..47e4ee8 100755 --- a/scripts/nmbug +++ b/scripts/nmbug @@ -457,10 +457,13 @@ def merge(reference='@{upstream}'): The default reference is '@{upstream}'. """ _insist_committed() +path = _os.path.join(NMBGIT, 'nmbug.index') + with _tempfile.TemporaryDirectory(prefix='nmbug-merge.') as workdir: _git( args=['merge', reference], -additional_env={'GIT_WORK_TREE': workdir}, +additional_env={'GIT_WORK_TREE': workdir, +'GIT_INDEX_FILE': path}, wait=True) checkout() -- 2.1.0
[PATCH] potential fix for nmbug merge problems
--- scripts/nmbug | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) This seems to fix the problems with merges failing on dirty indexes. I didn't have time to trace through all of the ramifications, but it seems to me by doing a merge with the default index, we are getting some kind of random state (or maybe the state of the last merge). I'll have to road test this a bit more to be sure it's a fix, but maybe you can think about whether it's the righ thing (TM) to do in any case. diff --git a/scripts/nmbug b/scripts/nmbug index 77bec64..47e4ee8 100755 --- a/scripts/nmbug +++ b/scripts/nmbug @@ -457,10 +457,13 @@ def merge(reference='@{upstream}'): The default reference is '@{upstream}'. """ _insist_committed() +path = _os.path.join(NMBGIT, 'nmbug.index') + with _tempfile.TemporaryDirectory(prefix='nmbug-merge.') as workdir: _git( args=['merge', reference], -additional_env={'GIT_WORK_TREE': workdir}, +additional_env={'GIT_WORK_TREE': workdir, +'GIT_INDEX_FILE': path}, wait=True) checkout() -- 2.1.0 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch