diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-01-17 19:46:28 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-01-22 14:59:10 +0300 |
commit | d6b4ed9cc7f6b27c9180627e7d1fec4d698af28c (patch) | |
tree | 39f571c50dfa21be9be2df4b0e2f91806ec5a206 /bdep/ci.cxx | |
parent | b83bc314314e18e76929ac9f6ae5d3715baeeb4e (diff) | |
download | bdep-d6b4ed9cc7f6b27c9180627e7d1fec4d698af28c.tar.gz bdep-d6b4ed9cc7f6b27c9180627e7d1fec4d698af28c.tar.xz bdep-d6b4ed9cc7f6b27c9180627e7d1fec4d698af28c.zip |
Add support for --force option in bdep-release and bdep-publish
Diffstat (limited to 'bdep/ci.cxx')
-rw-r--r-- | bdep/ci.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bdep/ci.cxx b/bdep/ci.cxx index 9298ef8..304818d 100644 --- a/bdep/ci.cxx +++ b/bdep/ci.cxx @@ -55,6 +55,10 @@ namespace bdep commit = move (s.commit); + // Note: not forcible. The use case could be to CI some commit from the + // past. But in this case we also won't have upstream. So maybe it will + // be better to invent the --commit option or some such. + // if (s.branch.empty ()) fail << "project directory is in the detached HEAD state" << info << "run 'git status' for details"; @@ -70,9 +74,15 @@ namespace bdep size_t p (path::traits::rfind_separator (s.upstream)); branch = p != string::npos ? string (s.upstream, p + 1) : s.upstream; + // Note: not forcible (for now). While the use case is valid, the + // current and committed package versions are likely to differ (in + // snapshot id). Obtaining the committed versions feels too hairy for + // now. + // if (s.staged || s.unstaged) fail << "project directory has uncommitted changes" << - info << "run 'git status' for details"; + info << "run 'git status' for details" << + info << "use 'git stash' to temporarily hide the changes"; // We definitely don't want to be ahead (upstream doesn't have this // commit) but there doesn't seem be anything wrong with being behind. |