Skip to content

Commit

Permalink
Display error if both -k and -a options passed to git-crypt lock
Browse files Browse the repository at this point in the history
  • Loading branch information
AGWA committed Sep 21, 2014
1 parent 690dba2 commit 88e8e3a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,11 @@ int lock (int argc, const char** argv)
return 2;
}

if (all_keys && key_name) {
std::clog << "Error: -k and --all options are mutually exclusive" << std::endl;
return 2;
}

// 0. Make sure working directory is clean (ignoring untracked files)
// We do this because we run 'git checkout -f HEAD' later and we don't
// want the user to lose any changes. 'git checkout -f HEAD' doesn't touch
Expand Down

0 comments on commit 88e8e3a

Please sign in to comment.