threads / discuss / 12161

Odd logic in rebase--interactive

Subject: Odd logic in rebase--interactive

## tl;dr

2 messages between Feb 17, 2008 and Feb 17, 2008.

replies: 1people: 2as markdown or json

Daniel Barkalow· Feb 17, 2008, 21:24 UTC · lore

In 1d25c8cf, you made pick_one not use the code for current and parent being the same if no_ff is set, which is true if -n is given. This looks like it makes the "git reset --soft $current_sha1" line dead code. Did you just forget to remove it, is there some other situation in which it would be wanted, or am I misunderstanding the code somehow?

	-Daniel
*This .sig left intentionally blank*
Johannes Schindelin· Feb 17, 2008, 21:41 UTC · re: Daniel Barkalow · lore

Re: Odd logic in rebase--interactive

Hi,
On Sun, 17 Feb 2008, Daniel Barkalow wrote:
Show 5 quoted lines
> In 1d25c8cf, you made pick_one not use the code for current and parent 
> being the same if no_ff is set, which is true if -n is given. This looks 
> like it makes the "git reset --soft $current_sha1" line dead code. Did 
> you just forget to remove it, is there some other situation in which it 
> would be wanted, or am I misunderstanding the code somehow?
No, you're correct, I just forgot to remove it.

The reset tried to have a fast track for the fast-forwarding case in the case of squash. But that was not enough, and 1d25c8cf really fixed the issue, making the reset code path unreachable.

Thanks, Dscho

← back to recent threads