Web lists-archives.com

Re: Bug: git branch returns EXIT_SUCCESS when no branches found

Dear Junio,

Junio C Hamano (gitster@xxxxxxxxx) 2019-04-24:
> This invocation is not in line with how "git branch" subcommand is
> designed to work.

This is fair. I completely accept a "you're wielding it wrong" answer!
However, your explanation sounds to me like that invocation is exactly
in line with how git branch is designed to work! What might I be

Junio C Hamano (gitster@xxxxxxxxx) 2019-04-24:
> If you want to ask "does the tip of $DEV_BRANCH reach commit
> 'master'?", the right way would probably be to ask
> 	if git merge-base --is-ancestor master "$DEV_BRANCH"
> 	then
> 		echo "master is an ancestor of $DEV_BRANCH"
> 	else
> 		echo "master has commits not in $DEV_BRANCH"B
> 		git --no-pager log "master..$DEV_BRANCH" --
> 	fi

This seems like a more convenient command for my current purpose,
although it's not a complete replacement for git branch. Thank you!

Sincerely yours,

Attachment: signature.asc
Description: PGP signature