git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git question rewarding git merge and its exit codes
@ 2023-06-26 12:14 Iván Expósito
  2023-06-26 15:25 ` rsbecker
  0 siblings, 1 reply; 3+ messages in thread
From: Iván Expósito @ 2023-06-26 12:14 UTC (permalink / raw)
  To: git

Hi, my name is Ivan.

Recently, we have been working on some automations for Git, especially
auto-merging some branches. Just noticed that when using: git merge
--commit --no-ff -m "test message", and no changes are needed, git
returns  "Already up-to-date" with exit code 0. Is this correct? Git
hasn't done anything, so not sure how correct is to return 0 for
success when nothing has been done. We have here a problem because the
only way we can detect if a commit has been made or not is to check
the return text, which is not the best idea for future-proof, or
changes in the return text.

Is this exit code as defined, or maybe is something we would need to
look into for future improvements? Is there any other alternatives to
detect what has happened, not comparing the standard output text?

Thanks for your work, If any information is needed, don't hesitate to
contact me.

Thanks,
Ivan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-26 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-26 12:14 Git question rewarding git merge and its exit codes Iván Expósito
2023-06-26 15:25 ` rsbecker
2023-06-26 17:35   ` Iván Expósito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).