+1

Log: usability enhancement for commands which work on commit range (e.g. Format Patch)

Bugged 2 years ago updated by Paul Du Bois 2 years ago 4

The first thing I thought about to do to create a format patch for a range of commit was to select all commits like this:

But only after a long time I figured out how to create a format patch for a range:

  1. https://github.com/deathaxe/sublime-a-file-icon-old/issues/1#issuecomment-447904728
  2. https://github.com/gitextensions/gitextensions/issues/5923
  3. https://smartgit.userecho.com/communities/1/topics/423-functionality-to-create-a-range-of-patches-all-labelled-sequentially

Only after luckily accessing these links in sequence, I figured out SmartGit already supported the format patch feature for several commits (I was just not selecting things right https://smartgit.userecho.com/communities/1/topics/890-hard-to-understand-the-format-patch-range), because every time I did the selection a range of commits (as in the picture), the SmartGit format patch option disappeared.

So you are suggesting that selecting a continuous set of commits should be handled like selecting the first and last commit of this range?

Yes. And additionally, if you try to skip a commit like this:


The menu would show a warning like "You can only Format Path with a continuous selection":


So, anyone can export a format patch right away, even if they never used a git client graphic interface.

I would never had though about selecting only the first and second commit to create format patch.

When I tried like this:

I just assumed SmartGit did not had this feature implemented, because the option for format patch, just vanished from the menu:

I think so. I am not aware of other commands which only work for 2 commit selections.

May be after this enhancement, I will start to get knowing them.

Drag-and-drop rebase also requires exactly 2 commits. Personally, my main issue is with discoverability. As long as it's discoverable, I don't have an opinion on whether this is done with discontiguous 2-commit selections vs range-selection with some sort of contiguity check.