[PATCH v3] nmbug: Translate to Python

W. Trevor King wking at tremily.us
Wed Aug 6 16:38:03 PDT 2014


On Tue, Aug 05, 2014 at 10:24:10PM -0300, David Bremner wrote:
> I have a local commit that deletes a couple tags; when I attempt to
> merge I get complaints about local changes to files.
> 
> error: Your local changes to the following files would be overwritten by merge:
> 	tags/1406859003-11561-2-git-send-email-amdragon at mit.edu/needs-review
> 	tags/1406859003-11561-3-git-send-email-amdragon at mit.edu/needs-review
> Please, commit your changes or stash them before you can merge.
>> Calling the perl version of nmbug successfully creates a little 
> diamond merge

The Perl version has:

  git ( { GIT_WORK_TREE => $tempwork }, 'checkout', '-f', 'HEAD');
  git ( { GIT_WORK_TREE => $tempwork }, 'merge', $commit);

But the Python version only has:

  _git(
      args=['merge', reference],
      additional_env={'GIT_WORK_TREE': workdir},
      wait=True)

I suppose we need the checkout to populate the working directory, but
I'm not sure we want to force the checkout.  Do we expect to have
unmerged entries in the index?

I'll add an unforced checkout here in v4.  I'll add it to pull() too,
now that it's decoupled from nmbug's merge implementation.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140806/d4b359f5/attachment.pgp>


More information about the notmuch mailing list