title: Cloud build step executing but not deploying function to Cloud functions?
body: <p>I have just started using GCP and have few cloud functions working and the source code for these Cloud function are in Cloud source repository. The architecture is like, we have a mono repository and it has multiple folders in it with each folder having source code,dependencies and credentials for each cloud functions.
  As of now we are manually deploying but the source code in cloud function but recently we started to create a CI/CD pipeline using cloud build. I have created a trigger &quot;push to master branch&quot; and using cloudbuild.yaml as the config file.
  As of now my cloudbuild.yaml has just one step which is to figure out which subfolder has got the commit and deploy only that particular function not all the cloud functions.
  This is where am facing the issue , the step runs perfectly but no cloud function is deployed and when I check the logs I get the log which ill be pasting below with the yaml file content.</p>
  <pre><code>steps:
  - name: 'gcr.io/cloud-builders/gcloud'
    entrypoint: 'bash'
    args:
      - -c
      - |    
        for d in $(git diff --name-only --diff-filter=AMDR @~..@ | cut -d'/' -f 1);
        do
          echo $d;
          cd $d
          gcloud functions deploy $d --region=us-central1 --runtime=python37 --trigger-http  --source=/workspace/.git/
          cd ..
        done
      ```
  
  LOGS -
  
   **starting build &quot;2b5c5348-d946-41bb-87f7-fd98d7e2f2d9&quot;
  
  FETCHSOURCE
  Initialized empty Git repository in /workspace/.git/
  From https://source.developers.google.com/p/littleone-150007/r/testRepForAnalytics
   * branch            677cf59b304d3b1b81488e48c1422cff9877824a -&gt; FETCH_HEAD
  HEAD is now at 677cf59 test
  BUILD
  Already have image (with digest): gcr.io/cloud-builders/gcloud
  fatal: ambiguous argument '@~..@': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git &lt;command&gt; [&lt;revision&gt;...] -- [&lt;file&gt;...]'
  PUSH
  DONE
  **
  
  </code></pre>