arxanas / git-branchless

High-velocity, monorepo-scale workflow for Git
Apache License 2.0
3.37k stars 80 forks source link

[Feature request] Support shell commands in revset aliases #1335

Open mfulbright opened 1 month ago

mfulbright commented 1 month ago

In a typical git alias section, aliases can execute either a git command or a shell command:

[alias]
  # Git command
  pushForce = push --force-with-lease
  # Shell command
  fetchRebase = "!git fetch origin master && git rebase origin/master && git update-ref refs/heads/master origin/master"

It would be great to be able to do the same with revset aliases:

[branchless "revsets.alias"]
  # Git branchless command
  grandChildren = children(children($1))
  # Shell command
  pushed = "!are_commits_pushed($1)"
mfulbright commented 1 month ago

I would love to add the 'enhancement' label to this, but I don't see a way to do that. I hope someone else can help with that!