Add full_move flag to GIT.GenerateDiff and Factor out FindGclientRootDir into gclient_utils.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/501171

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35154 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_utils.py b/gclient_utils.py
index 4944cf9..97d05ed 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -307,3 +307,13 @@
     if os.path.exists(os.path.join(root, path, '.git')):
       return True
   return False
+
+def FindGclientRoot(from_dir):
+  """Tries to find the gclient root."""
+  path = os.path.realpath(from_dir)
+  while not os.path.exists(os.path.join(path, '.gclient')):
+    next = os.path.split(path)
+    if not next[1]:
+      return None
+    path = next[0]
+  return path