zixia / git-scripts

Git hooks integration for Node.js projects
https://npmjs.com/package/git-scripts
MIT License
48 stars 16 forks source link

Support to obtain information of multiple branches in one push #14

Closed binsee closed 2 years ago

binsee commented 2 years ago

Support to obtain information of multiple branches in one push.

like:

git push --dry-run origin test test2

args [
  'origin',
  'git@github.com:binsee/chatie-git-scripts.git',
  'refs/heads/test',
  'd7356b9e9b2d9239a01eec6d3d39478733ea647b',
  'refs/heads/test',
  '0000000000000000000000000000000000000000',
  'refs/heads/test2',
  'd7356b9e9b2d9239a01eec6d3d39478733ea647b',
  'refs/heads/test2',
  '0000000000000000000000000000000000000000'
]

refs [
  {
    localBranch: 'refs/heads/test',
    localCommit: 'd7356b9e9b2d9239a01eec6d3d39478733ea647b',
    remoteBranch: 'refs/heads/test',
    remoteCommit: '0000000000000000000000000000000000000000'
  },
  {
    localBranch: 'refs/heads/test2',
    localCommit: 'd7356b9e9b2d9239a01eec6d3d39478733ea647b',
    remoteBranch: 'refs/heads/test2',
    remoteCommit: '0000000000000000000000000000000000000000'
  }
]

To github.com:binsee/chatie-git-scripts.git
 * [new branch]      test -> test
 * [new branch]      test2 -> test2