# Leave the original files in the working tree in case of a merge conflict
#keeporig: yes
+# Optimize (repack) the object store after every pull
+#keepoptimized: yes
+
# Extensions for the files involved in a three-way merge (ancestor,
# current, patched)
#extensions: .ancestor .current .patched
if not options.nopush:
push_patches(applied, options.merged)
+ # maybe tidy up
+ repack = config.get('stgit', 'keepoptimized')
+ if repack == 'yes':
+ git.repack()
+
print_crt_patch()
'diff3 -L current -L ancestor -L patched -m -E ' \
'"%(branch1)s" "%(ancestor)s" "%(branch2)s" > "%(output)s"')
config.set('stgit', 'keeporig', 'yes')
+config.set('stgit', 'keepoptimized', 'no')
config.set('stgit', 'extensions', '.ancestor .current .patched')
# Read the configuration files (if any) and override the default settings
if __run(config.get('stgit', 'pullcmd'), args) != 0:
raise GitException, 'Failed "git-pull %s"' % repository
+def repack():
+ """Repack all objects into a single pack
+ """
+ __run('git-repack -a -d -f')
+
def apply_patch(filename = None, diff = None, base = None,
fail_dump = True):
"""Apply a patch onto the current or given index. There must not