Merge "init: add --submodules to sync manifest submodules"
diff --git a/.mailmap b/.mailmap
index eb64bd2..905139d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,4 +1,5 @@
 Anthony Newnam <anthony.newnam@garmin.com>    Anthony <anthony@bnovc.com>
+He Ping <tdihp@hotmail.com>                   heping <tdihp@hotmail.com>
 Hu Xiuyun <xiuyun.hu@hisilicon.com>           Hu xiuyun <xiuyun.hu@hisilicon.com>
 Hu Xiuyun <xiuyun.hu@hisilicon.com>           Hu Xiuyun <clouds08@qq.com>
 Jelly Chen <chenguodong@huawei.com>           chenguodong <chenguodong@huawei.com>
diff --git a/project.py b/project.py
index e3185b8..ed5b0e6 100644
--- a/project.py
+++ b/project.py
@@ -1984,15 +1984,17 @@
           ids.add(ref_id)
           tmp.add(r)
 
-        tmp_packed = ''
-        old_packed = ''
+        tmp_packed_lines = []
+        old_packed_lines = []
 
         for r in sorted(all_refs):
           line = '%s %s\n' % (all_refs[r], r)
-          tmp_packed += line
+          tmp_packed_lines.append(line)
           if r not in tmp:
-            old_packed += line
+            old_packed_lines.append(line)
 
+        tmp_packed = ''.join(tmp_packed_lines)
+        old_packed = ''.join(old_packed_lines)
         _lwrite(packed_refs, tmp_packed)
       else:
         alt_dir = None
diff --git a/subcmds/abandon.py b/subcmds/abandon.py
index 6f78da7..be32dc5 100644
--- a/subcmds/abandon.py
+++ b/subcmds/abandon.py
@@ -81,7 +81,7 @@
         err_msg = "error: cannot abandon %s" %br
         print(err_msg, file=sys.stderr)
         for proj in err[br]:
-          print(' '*len(err_msg) + " | %s" % p.relpath, file=sys.stderr)
+          print(' '*len(err_msg) + " | %s" % proj.relpath, file=sys.stderr)
       sys.exit(1)
     elif not success:
       print('error: no project has local branch(es) : %s' % nb,
diff --git a/subcmds/gitc_delete.py b/subcmds/gitc_delete.py
index 7380c35..19caac5 100644
--- a/subcmds/gitc_delete.py
+++ b/subcmds/gitc_delete.py
@@ -14,12 +14,10 @@
 # limitations under the License.
 
 from __future__ import print_function
-import os
 import shutil
 import sys
 
 from command import Command, GitcClientCommand
-import gitc_utils
 
 from pyversion import is_python3
 if not is_python3():