Skip to content

rebase: orig_head and onto accessors#5057

Merged
ethomson merged 1 commit intolibgit2:masterfrom
eaigner:merge-rebase-onto-name
May 12, 2019
Merged

rebase: orig_head and onto accessors#5057
ethomson merged 1 commit intolibgit2:masterfrom
eaigner:merge-rebase-onto-name

Conversation

@eaigner
Copy link
Copy Markdown

@eaigner eaigner commented Apr 21, 2019

The rebase struct stores fields with information about the current
rebase process, which were not accessible via a public interface.

Accessors for getting the orig_head and onto branch
names and object ids have been added.

The rebase struct stores fields with information about the current
rebase process, which were not accessible via a public interface.

Accessors for getting the `orig_head` and `onto` branch
names and object ids have been added.
@tiennou
Copy link
Copy Markdown
Contributor

tiennou commented Apr 23, 2019

Since you're poking around interactive rebase, this is my own poke around the rebase code. Started last year, quickly rebased, may contain hazardous material, YMMV.

Copy link
Copy Markdown
Contributor

@tiennou tiennou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the accessor comment, this looks fine to me. Thanks @eaigner 👍 !

@eaigner
Copy link
Copy Markdown
Author

eaigner commented May 1, 2019

I reverted it to the original approach, since annotated commits seem overkill to me and I think its better to reflect the actual files on disk without having some voodoo magic inbetween. I left the string accessors with name instead of ref in their names, since its a name (char *) and not an actual git_reference object.

So the interface looks like this again:

const char *git_rebase_orig_head_name(git_rebase *rebase);
const git_oid *git_rebase_orig_head_id(git_rebase *rebase);
const char *git_rebase_onto_name(git_rebase *rebase);
const git_oid *git_rebase_onto_id(git_rebase *rebase);

@ethomson
Copy link
Copy Markdown
Member

LGTM. Thanks @eaigner!

@ethomson ethomson merged commit 7f562f2 into libgit2:master May 12, 2019
@eaigner
Copy link
Copy Markdown
Author

eaigner commented May 12, 2019

🎉😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants