Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Support gh stack rebase --reset-author-date / --committer-date-is-author-date passthrough #34

Copy link
Copy link
@Kick-snare

Description

@Kick-snare
Issue body actions

Feature request

gh stack rebase currently invokes git rebase without passing through date-related flags. It would be useful to support --reset-author-date and/or --committer-date-is-author-date so users can control how commit timestamps are handled during cascade rebases.

Current behavior

git rebase and git rebase --onto are called with no date flags:

  • internal/git/gitops.goRebase(): runSilent("rebase", base)
  • internal/git/gitops.goRebaseOnto(): runSilent("rebase", "--onto", newBase, oldBase, branch)

Commit timestamps follow git's default rebase behavior. There is no way to pass date-related flags through gh stack rebase.

Proposed behavior

Add optional flags to gh stack rebase:

  • --reset-author-date — forwards --reset-author-date to the underlying git rebase calls
  • --committer-date-is-author-date — forwards --committer-date-is-author-date to the underlying git rebase calls

These should be forwarded to both Rebase() and RebaseOnto() calls throughout the cascade rebase, including --continue flows.

Use case

When rebasing stacked branches, the committer date can become significantly newer than the author date, causing commits to appear out of chronological order in tools that sort by committer date. Having control over date handling during gh stack rebase would keep commit history clean and consistent.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.