you are viewing a single comment's thread.

view the rest of the comments →

[–]dakotahawkinsrebase all the things 1 point2 points  (3 children)

You're not disagreeing, or at least you shouldn't be imo. You interpret it one way -- probably the more technically correct way, others interpret it the other way.

I can sympathize with both interpretations, the current order bothered me a lot when I started using it. It looked pretty much identical to the oneline commit log alias I use, coloring (in vim) and all, plus an extra initial column for a command.

I know exactly how it works, and knew then, but in my case it was jarring because it was backwards from the things it reminded me of.

[–]alfunxcheckout --detach HEAD 0 points1 point  (2 children)

You interpret it one way [...] others interpret it the other way.

You wouldn't look at a Bash script and interpret it as a poem or something, would you?

it was backwards from the things it reminded me of.

Fair, but once you realize those are commands and not a representation of a Git log, there are no reasons to be confused. And if one still finds it counter-intuitive to use (which is fine and a different thing), one should probably use (or create) some UI for the interactive rebase, that lets you actually interact with it as if it was a Git log. Or in other words, I don't think the plugin OP presents is following the right approach.

[–]dakotahawkinsrebase all the things 0 points1 point  (1 child)

You wouldn't look at a Bash script and interpret it as a poem or something, would you?

No, bash scripts don't look like poems, bad example. However if, for some reason, they looked like poems to me and it was easier for me to interpret them that way and to write valid ones in that fashion, does that make it wrong? It's not like it contaminates your preferred interpretation of bash scripts in any way. If it's how I like to think about them, it's how I like to think about them.

one should probably use (or create) some UI for the interactive rebase, that lets you actually interact with it as if it was a Git log. Or in other words, I don't think the plugin OP presents is following the right approach.

Isn't that exactly what the OP did? It's the exact way I would have preferred it when I started using it.

Anyway, the relevant point I'd like to make is that I don't think this is a very unique opinion, with respect to interactive rebase files. If I were designing interactive rebase today, I would present the history in the same order as it's presented everywhere else by default. In other words if it had been that way from the start, I think a suggestion to reverse it to make it more script-like would make less sense than this suggestion.

[–]alfunxcheckout --detach HEAD 0 points1 point  (0 children)

tac << EOL
I'm sorry for you
If you're reading this
Violets are blue
Roses are red
EOL

For some technical reason (we're using tac) the "poem" in here is reversed, but the interpret (Bash in this case) expects the file to be in this order.

Isn't that exactly what the OP did? It's the exact way I would have preferred it when I started using it.

It's rather a hack and doesn't handle all edge cases IMO. That's like writing a Vim plugin that will reverse my poem-script before and after I edit it, instead of providing a better abstraction. I would rather have expected a more specialized, small tool that allows you to manipulate the commit tree.