I've gone through a lot of rules on conditional sentences in English and couldn't find the answer.

What time should I use in the following comment to a source code?

  1. # Rebuild databases if 'exampleFile.sql' has changed
  2. # Rebuild databases if 'exampleFile.sql' has been changed
  3. # Rebuild databases if 'exampleFile.sql' was changed
  4. # Rebuild databases if 'exampleFile.sql' is changed
  5. # Rebuild databases if 'exampleFile.sql' changed

The required meaning is "Perform a check. If, and only if, it is (?) detected that a certain file is (hmm?) changed due to some external forces, a script (that rebuilds a database) should be executed right after the check."

1 Answer 1


Of those 5 I would go with #2

# Rebuild databases if 'exampleFile.sql' has been changed

due to the connotation of action having been actively taken to change it, rather than changes just happening to it. I would possibly consider saying instead

# Rebuild databases if changes have been detected in 'exampleFile.sql'
  • I find the detected version pretty useful. However, I wonder if it shouldn't be "...if changes have been detected in..."?
    – jera
    Jan 15, 2016 at 10:57
  • Good point, I'll edit. Cheers jera. Jan 15, 2016 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.