]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - tools/patman/gitutil.py
x86: Disable -Werror
[karo-tx-uboot.git] / tools / patman / gitutil.py
index cc5a55ab3ffefd7fce9c0107c9470bbd0d05ed2e..9e739d89b6ff7ac261d6bc96b6c66def4b7d2937 100644 (file)
@@ -129,7 +129,7 @@ def GetUpstream(git_dir, branch):
         return upstream, msg
 
     if remote == '.':
-        return merge
+        return merge, None
     elif remote and merge:
         leaf = merge.split('/')[-1]
         return '%s/%s' % (remote, leaf), None
@@ -392,7 +392,8 @@ def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname,
                    "Or do something like this\n"
                    "git config sendemail.to u-boot@lists.denx.de")
             return
-    cc = BuildEmailList(series.get('cc'), '--cc', alias, raise_on_error)
+    cc = BuildEmailList(list(set(series.get('cc')) - set(series.get('to'))),
+                        '--cc', alias, raise_on_error)
     if self_only:
         to = BuildEmailList([os.getenv('USER')], '--to', alias, raise_on_error)
         cc = []
@@ -544,6 +545,17 @@ def GetDefaultUserEmail():
     uemail = command.OutputOneLine('git', 'config', '--global', 'user.email')
     return uemail
 
+def GetDefaultSubjectPrefix():
+    """Gets the format.subjectprefix from local .git/config file.
+
+    Returns:
+        Subject prefix found in local .git/config file, or None if none
+    """
+    sub_prefix = command.OutputOneLine('git', 'config', 'format.subjectprefix',
+                 raise_on_error=False)
+
+    return sub_prefix
+
 def Setup():
     """Set up git utils, by reading the alias files."""
     # Check for a git alias file also