Skip to content

Commit

Permalink
no longer use native rebase to find commits
Browse files Browse the repository at this point in the history
seems pointless & hacky to launch 2 rebases instead of finding the
commits ourselves & then only launching the rebase when appropriate
to do the actual rebasing.
because of stuff like hooks etc., it just doesn't feel right.

i don't know if there's stuff we're missing out on that native rebase
is better at, esp. w/ edge cases, but i suppose we'll have to find out.

Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
  • Loading branch information
kiprasmel committed May 8, 2022
1 parent b4ff060 commit 0875acf
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions git-stacked-rebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,18 @@ export const gitStackedRebase = async (
initialBranch,
currentBranch,
// __default__pathToStackedRebaseTodoFile
pathToStackedRebaseTodoFile,
() =>
getWantedCommitsWithBranchBoundariesUsingNativeGitRebase({
gitCmd: options.gitCmd,
repo,
initialBranch,
currentBranch,
dotGitDirPath,
pathToRegularRebaseTodoFile,
pathToStackedRebaseTodoFile,
pathToRegularRebaseDirInsideDotGit,
})
pathToStackedRebaseTodoFile
// () =>
// getWantedCommitsWithBranchBoundariesUsingNativeGitRebase({
// gitCmd: options.gitCmd,
// repo,
// initialBranch,
// currentBranch,
// dotGitDirPath,
// pathToRegularRebaseTodoFile,
// pathToStackedRebaseTodoFile,
// pathToRegularRebaseDirInsideDotGit,
// })
);

if (!wasRegularRebaseInProgress || options.viewTodoOnly) {
Expand Down Expand Up @@ -979,6 +979,7 @@ async function getWantedCommitsWithBranchBoundariesOurCustomImpl(
return extendCommitsWithBranchEnds(repo, bb, wantedCommits);
}

noop(getWantedCommitsWithBranchBoundariesUsingNativeGitRebase);
async function getWantedCommitsWithBranchBoundariesUsingNativeGitRebase({
gitCmd,
repo,
Expand Down

0 comments on commit 0875acf

Please sign in to comment.