Comparing version 0.1.1 to 0.1.2
@@ -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'); |
{ | ||
"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 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76690
1776