Repository navigation
Default Branch / Recent Branches / Other Branches - #247
Conversation
| // "git reflog show" is just an alias for "git log -g --abbrev-commit --pretty=oneline" | ||
| // but by using log we can give it a max number which should prevent us from balling out | ||
| // of control when there's ginormous reflogs around (as in e.g. github/github). | ||
| const regex = new RegExp(/.* checkout: moving from .* to (.*)$/i) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Bah, this got collapsed:
|
Sure! So For example, let's take this regex:
Thus But if we change it to Thus This is important because it reduces the amount of backtracking the regex engine does. For example, imagine we're matching the following.
The initial Then it moves to the And so on, and so on. With a lazy match, it's way more efficient for scenarios like this. |
|
BTW, if you ever want to level up your regular expression skills, I highly recommend Mastering Regular Expressions by Friedl. I actually found it to be an enjoyable read and he explains them so well that to this day I still feel very comfortable with them. |
|
Dumb question, but how do I show the branches pop-up. I don't see the menu option anywhere. |
Ahhhh ok that's the bit I was missing 👍
So I think on Windows right now you can right-click most anywhere and it shows the menu. Alternatively, hitting Control-B should work too. |
|
I guess they're useful, but maybe should be grouped in a "remote branches" section or "branches on the server" |
|
Hmm yeah. In Desktop TPG we don't put them in their own section but it's worth talking about. I'll make a new issue for it 👍 |
Ok, there's other concerns I have. But for now, this code is fine. After all, it's pretty clearly a WIP UI and we can iterate on that in future PRs. If it's not a WIP UI, what happened to @donokuda? His skills are atrophying. |
If they're non-UI related, mind making issues for them? |
💀 An issue around branches would be ✨. Other things we might want to think about are branch management. Are there things we would want to consider such as deleting or renaming branches, when are those capabilities considered useful to have, and how often does that need occur? Not sure if that's aligned with @haacked's concerns so I'll wait until he opens up the issue before I jump in with a few quick 💭s |
I'm not sure Hot pink with fire is a good look for our pop ups. 😛 |


Fixes #65