Skip to content

Updated git-subtree.sh to handle annotated tags #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions git-subtree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ esac
dir="$(dirname "$prefix/.")"

if [ "$command" != "pull" -a "$command" != "add" -a "$command" != "push" ]; then
revs=$(git rev-parse $default --revs-only "$@") || exit $?
revs="$(git rev-parse $default --revs-only "$@")^{}" || exit $?
dirs="$(git rev-parse --no-revs --no-flags "$@")" || exit $?
if [ -n "$dirs" ]; then
die "Error: Use --prefix instead of bare filenames."
Expand Down Expand Up @@ -519,7 +519,7 @@ cmd_add_repository()

cmd_add_commit()
{
revs=$(git rev-parse $default --revs-only "$@") || exit $?
revs="$(git rev-parse $default --revs-only "$@")^{}" || exit $?
set -- $revs
rev="$1"

Expand Down Expand Up @@ -580,7 +580,8 @@ cmd_split()
eval "$grl" |
while read rev parents; do
revcount=$(($revcount + 1))
say -n "$revcount/$revmax ($createcount)"
say -n "$revcount/$revmax ($createcount)
"
debug "Processing commit: $rev"
exists=$(cache_get $rev)
if [ -n "$exists" ]; then
Expand Down Expand Up @@ -643,7 +644,7 @@ cmd_split()

cmd_merge()
{
revs=$(git rev-parse $default --revs-only "$@") || exit $?
revs="$(git rev-parse $default --revs-only "$@")^{}" || exit $?
ensure_clean

set -- $revs
Expand Down