Revision aa94e60eada5f44e43ecc0684057cc464ba325c1 authored by Ben Woosley on 19 April 2016, 00:49:52 UTC, committed by Ben Woosley on 20 April 2016, 16:57:21 UTC
Absent this fix, attempts to rebase an orphan branch with --strategy recursive
will fail with:

    $ git rebase ORPHAN_TARGET_BASE -s recursive
    First, rewinding head to replay your work on top of it...
    fatal: Could not parse object 'ORPHAN_ROOT_SHA^'
    Unknown exit code (128) from command: git-merge-recursive ORPHAN_ROOT_SHA^ -- HEAD ORPHAN_ROOT_SHA

To fix, this will only include the rebase root's parent as a base if it exists,
so that in cases of rebasing an orphan branch, it is a simple two-way merge.

Note the default rebase behavior does not fail:

    $ git rebase ORPHAN_TARGET_BASE
    First, rewinding head to replay your work on top of it...
    Applying: ORPHAN_ROOT_COMMIT_MSG
    Using index info to reconstruct a base tree...

Signed-off-by: Ben Woosley <ben.woosley@gmail.com>
1 parent 6a66362
Raw File
trailer.h
#ifndef TRAILER_H
#define TRAILER_H

void process_trailers(const char *file, int in_place, int trim_empty,
		      struct string_list *trailers);

#endif /* TRAILER_H */
back to top