Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

baobranch

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baobranch - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

22

bin/commands/list/tree.js

@@ -18,8 +18,24 @@ // tree.ts

MERGE_BASE=$(git merge-base --octopus $(git branch --format='%(refname)'))
if git rev-parse $MERGE_BASE^ >/dev/null 2>&1; then
# Has parent - use ~.. to show from merge-base up
git -c color.ui=always log --simplify-by-decoration --decorate --oneline --graph --branches \${MERGE_BASE}~..
# Prints the git log, in the format of <hash> (decorations) and only keeps
# the commits that have tags, HEAD, a local branch, or a
# (origin/remote, local-name) decoration. Then cuts the decorations off.
COMMITS_OF_INTEREST=$(git log --simplify-by-decoration --decorate --oneline --branches \${MERGE_BASE}~.. --format="%h%d" | \
grep -E "^.+(tag)|(HEAD)|(\\([^/]+\\))|(\\([^/]+, ?origin/.+\\))|(\\(?origin/.+\\,[^/]+)).*$" | \
cut -d' ' -f1)
else
# No parent (root commit) - use range to include merge-base. Find all commits that are only on remote branches
COMMITS_OF_INTEREST=$(git log --simplify-by-decoration --decorate --oneline --branches \${MERGE_BASE}^@ --format="%h%d" | \
grep -E "^.+(tag)|(HEAD)|(\\([^/]+\\))|(\\([^/]+, ?origin/.+\\))|(\\(?origin/.+\\,[^/]+)).*$" | \
cut -d' ' -f1)
fi
if git rev-parse $MERGE_BASE^ >/dev/null 2>&1; then
# Has parent - use ~.. to show from merge-base up. Then only keeps the
# commits of interest and the lines that don't have a commit (the branching)
git -c color.ui=always log --simplify-by-decoration --decorate --oneline --graph --branches \${MERGE_BASE}~.. | grep -E "$COMMITS_OF_INTEREST|(^[^*]*$)"
else
# No parent (root commit) - use range to include merge-base
git -c color.ui=always log --simplify-by-decoration --decorate --oneline --graph --branches \${MERGE_BASE}^@
git -c color.ui=always log --simplify-by-decoration --decorate --oneline --graph --branches \${MERGE_BASE}^@ | grep -E "$COMMITS_OF_INTEREST|(^[^*]*$)"
fi`);

@@ -26,0 +42,0 @@ const staleParentRegex = new RegExp(`tag:.+${makeStaleParentTag('(.+?)', '[0-9]+')}`, 'g');

2

package.json
{
"name": "baobranch",
"version": "0.1.1",
"version": "0.1.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -101,6 +101,6 @@ # BaoBranch

* 90cb39a (D) d
* 30ee5d7 (HEAD -> C) c
* 30ee5d7 (C) c
| * c05d40e (B) b
|/
* 26106c3 (A) a
* 26106c3 (HEAD -> A) a
* 0e59234 (main) tip

@@ -107,0 +107,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc