summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
841c7b2)
The 'shortnr' config option was added so that one can set a different
length than the default 5.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
# current, patched)
#extensions = .ancestor .current .patched
# current, patched)
#extensions = .ancestor .current .patched
+ # The number of patches to be listed before and after the
+ # current one by the 'series --short' command
+ #shortnr = 5
+
[mail "alias"]
# E-mail aliases used with the 'mail' command
git = git@vger.kernel.org
[mail "alias"]
# E-mail aliases used with the 'mail' command
git = git@vger.kernel.org
unapplied = [p for p in unapplied if p in show_patches]
if options.short:
unapplied = [p for p in unapplied if p in show_patches]
if options.short:
- if len(applied) > 5:
- applied = applied[-6:]
- if len(unapplied) > 5:
- unapplied = unapplied[:5]
+ nr = int(config.get('stgit', 'shortnr'))
+ if len(applied) > nr:
+ applied = applied[-(nr+1):]
+ if len(unapplied) > nr:
+ unapplied = unapplied[:nr]
patches = applied + unapplied
patches = applied + unapplied
config.set('stgit', 'keeporig', 'yes')
config.set('stgit', 'keepoptimized', 'no')
config.set('stgit', 'extensions', '.ancestor .current .patched')
config.set('stgit', 'keeporig', 'yes')
config.set('stgit', 'keepoptimized', 'no')
config.set('stgit', 'extensions', '.ancestor .current .patched')
+ config.set('stgit', 'shortnr', '5')
# Read the configuration files (if any) and override the default settings
# stgitrc are read for backward compatibility
# Read the configuration files (if any) and override the default settings
# stgitrc are read for backward compatibility