Only trigger stacked changes dogfood path when in squash mode.

Bug: 1419551
Change-Id: Idbc345798ba81c3e1abd2038db8fadbef0b7391e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4291331
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index b1ba096..3c8e4ac 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -4762,7 +4762,7 @@
     # Load default for user, repo, squash=true, in this order.
     options.squash = settings.GetSquashGerritUploads()
 
-  if os.environ.get('DOGFOOD_STACKED_CHANGES') == '1':
+  if options.squash and os.environ.get('DOGFOOD_STACKED_CHANGES') == '1':
     if options.dependencies:
       parser.error('--dependencies is not available for this workflow.')