Skip to content

Question about cat-file #535

Answered by AndreasAugustin
herrwusel asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @herrwusel ,
sorry for asking but did you check the error code after git cat-file -e ... ?
E.g. with echo $? ?
https://www.cyberciti.biz/faq/bash-get-exit-code-of-command/

Related to docs git cat-file -e

-e
Exit with zero status if [object] exists and is a valid [object]. If object is of an invalid format, exit with non-zero status and emit an > error on stderr.

Another thought:
If an independent repo, the commit hash is with very first run not present within the target repo. So the command have exit code 0 (if I get your workflow right).

After the merge the commit will be part (also squash commits. Squash commits are the reason for using cat-file)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@herrwusel
Comment options

Answer selected by herrwusel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants