hgext/mq.py
changeset 3698 a9090b264250
parent 3697 da262f35fbc8
child 3699 4bafcf7aeb32
--- a/hgext/mq.py	Mon Nov 20 19:32:40 2006 -0200
+++ b/hgext/mq.py	Mon Nov 20 19:32:41 2006 -0200
@@ -966,6 +966,8 @@
             comments = "\n".join(comments) + '\n\n'
             patchf.write(comments)
 
+        if opts.get('git'):
+            self.diffopts().git = True
         fns, matchfn, anypats = cmdutil.matchpats(repo, pats, opts)
         tip = repo.changelog.tip()
         if top == tip:
@@ -1021,8 +1023,6 @@
             r = util.unique(dd)
             a = util.unique(aa)
             filelist = filter(matchfn, util.unique(m + r + a))
-            if opts.get('git'):
-                self.diffopts().git = True
             patch.diff(repo, patchparent, files=filelist, match=matchfn,
                        fp=patchf, changes=(m, a, r, [], u),
                        opts=self.diffopts())