Bug 582526 - rebase returns wrong result on autostash conflict
Summary: rebase returns wrong result on autostash conflict
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 6.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 6.8   Edit
Assignee: Thomas Wolf CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-10 09:20 EDT by Michael Toifl CLA
Modified: 2023-10-13 18:34 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Toifl CLA 2023-10-10 09:20:13 EDT
when doing a 
RebaseResult r = git.rebase().call() ;

if the above rebase is a purely FAST_FORWARD
r.getStatus() will not return RebaseResult.Status.STASH_APPLY_CONFLICTS even is there is a conflict

I think the reason is, that 
- in the FAST_FORWARD case, autoStashApply() is called directly in RebaseCommand.call(line 295) and the 
  boolean result, that indicates if there was a conflict applying the autostash is disregarded, 
  whilest 
- in the "normal" case the RebaseCommand::finishRebase is beeing called, where the result of the 
  autoStashApply() is taken into account, resulting in the expected STASH_APPLY_CONFLICTS state
Comment 1 Matthias Sohn CLA 2023-10-13 18:34:26 EDT
https://git.eclipse.org/r/c/jgit/jgit/+/204913