When only unapplied patches are to be sync'ed, the command failed
because the first patch was trying to be pushed twice.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
to_pop = applied[applied.index(first_patch) + 1:]
if to_pop:
pop_patches(crt_series, to_pop[::-1])
to_pop = applied[applied.index(first_patch) + 1:]
if to_pop:
pop_patches(crt_series, to_pop[::-1])
popped = to_pop + [p for p in patches if p in unapplied]
popped = to_pop + [p for p in patches if p in unapplied]
- for p in [first_patch] + popped:
+ for p in pushed + popped:
if p in popped:
# push this patch
push_patches(crt_series, [p])
if p in popped:
# push this patch
push_patches(crt_series, [p])