Commit Graph

72 Commits (36179f554889bdadf476421a7fc3d40147e6e4c5)

Author SHA1 Message Date
Robert Iannucci d3acb16c9c [git-rebase-update] Disallow `git gc` during git-rebase-update.
In theory this should prevent `git rebase-update` from invoking
potentially expensive `git gc` operations after every `git rebase`
(ideally once per branch, but sometimes as many as three per branch (!)).

This has outsized effects as the size of the repo or number of branches
increases, and additionally has penalties on Windows due to git's
POSIXey assumptions around how disk I/O works.

After doing all rebase stuff, we run `git gc --auto` from rebase-update
once (assuming we were successful; if the command failed then we don't
run gc at all).

R=apolito@google.com

Bug: 617218
Change-Id: I37a8f7953779f15b320e4ed7bb85119cb4bb665a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2868766
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
4 years ago
Josip Sokcevic 0642373b27 Update origin/HEAD automatically
If origin/HEAD resolves to `master`, depot_tools can check if
origin/main exists. If so, it's very likely that origin/HEAD should be
updated to point to origin/main.
In the worst case, this will result in extra git remote call while not
changing local state (i.e origin/HEAD remained unchanged).

R=gavinmak@google.com

Bug: 1190702
Change-Id: I51e69d7a95d3534e1820099b4b6983d38b5e2763
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2795075
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Antonio Sartori e0dff20891 Make git map-branches faster
This change makes git map-branches a little bit faster by avoiding
fetching the revision list of each branch if git map-branches will not
show the tracking info anyway.

Change-Id: I47458871f904004f910aadd7d774bea5193c979e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2695393
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
4 years ago
Edward Lesmes cf06cad1be [subprocess2] Replace VOID with DEVNULL
subprocess.DEVNULL was introduced in Python3 to serve same purpose
as subprocess2.VOID, so rename VOID to DEVNULL in subprocess2.

Change-Id: I6dade3306ffc3bc2441ac6083f362b099c2427e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2587758
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Josip Sokcevic 9c0dc3026e Replace non-inclusive terms
Bug: 1118410, 1118413, 1118422, 1118424, 1118426
Bug: 1118428, 1118430, 1118434, 1118438, 1118442
Bug: 1118453, 1118454
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: build
Change-Id: I43e6305f8c3136774f01b57f12bb442bcb863371
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2551388
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Gavin Mak 934ac6ebdf [depot_tools] Add --fork-point when computing merge-base
Using --fork-point when possible reduces the number of merge conflicts when running merge-base.

Bug: 1111269
Change-Id: I7240fdc9a613d2eb4e856b5677fc713551d7afe9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2519729
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Sylvain Defresne 39d870e1f0 Fix `git map-branches` when branch is named after a file/directory
If there is a branch named after a file in the repository root, the
command `git rev-list --count $branch ^$base` is ambiguous. This is
because `git` does not know whether $branch needs to be parsed as a
revision or a filename.

Adding a trailing `--` parameter to the command-line resolves this
ambiguity since when present, everything before the `--` cannot be
a filename and everything after `--` has to one.

From git documentation:

  Paths may need to be prefixed with -- to separate them from
  options or the revision range, when confusion arises.

Bug: none
Change-Id: Ieb10aa8701e12fc3c88d5f75ff624f61ee8d8aaa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2475773
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
4 years ago
Gavin Mak 8d7201bc3c Modify git map-branches to show the number of commits on a branch
Currently, for a given branch, map-branches displays the number of
commits ahead and behind it is. This change replaces ahead with
commits, representing the number of commits a branch has, starting from
its base commit, and more accurately reflects the state of a repo.

Bug:1128716
Change-Id: I7c070b4efd452d82d878e1cfb7c20d1c80f38ec7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2412991
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
5 years ago
Richard He 42033b2c6a Fix gclient-new-workdir when source repo is shallow clone
When source repo is a 'shallow clone', `.git/shallow` is not linked to
the new workdir. Which makes running git command fails in new workdir.

Change-Id: I81d38b7b2cccc482711dcc1dd02ea06fbd01a56d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2211635
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Richard He <linyhe@microsoft.com>
5 years ago
Josip Sokcevic 72f991f760 Fix printing error on git-rebase failure
Reverted commit 4511b131e6 had a bug where
squash_ret.success = True and empty_rebase = False. In that case, stdout
and stderr would already be string and trying to decode would fail.

Bug: 1071280
Change-Id: Iadcc526147ebb98aa7a91a7daa64ef44066e83b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2163387
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Andrew Grieve fc5e103221 Fix "git freeze" failing on broken symlinks
Fixed by switching "stat()" to "lstat()".

Does not seem to be a python3 vs python2 thing (fails on py2 as well).

Bug: 1071066
Change-Id: I7eea9ed39b43e09ae2f7558bf23c12581f02e4a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2150507
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
5 years ago
Quinten Yearsley 925cedba7b Run spellchecker on depot_tools
This was made by running `codespell` and `scspell`
and then checking the results.

Change-Id: I169fd5b40294f83015075b4a899fbca263821f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2144602
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Auto-Submit: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Josip Sokcevic de6c456466 Fix max value for git_common threading
This fixes default value for Windows platform. Unit tests still don't
work for Windows as CTRL+C handling is not working properly.

Change-Id: I11fd33279313bfd7a2070e90164da6cf9f63696e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2121555
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur b800fde565 git-map: Refactor and add simple tests
Change-Id: I8fd0034f6a6d7623792620f92208b25961fa174e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1990142
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 0d462e99bc git-hyper-blame: Simplify code and tests.
Remove default value from optional arguments, since they are always passed.

In particular, the default value for `out` was a text stream (sys.stdout),
but the value passed to `out` is always a binary stream, which is confusing.
Get rid of the `err` argument, since it is always sys.stderr, and only used
for testing.

Change-Id: Ia289e9a97b968a0c802fc2f419397c1e494f713c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1986064
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Jeffrey Yasskin 6b52dc21e1 Default to origin's default branch instead of always origin/master.
BUG=1023031

Change-Id: I4bf3e33932af40600646f070f057a7c8c0661f33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1954624
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Jeffrey Yasskin <jyasskin@chromium.org>
5 years ago
Edward Lemur 5e94b80c34 git-hyper-blame: Fix unicode handling.
git hyper_blame might use a subprocess' stdin for its stdout,
which is opened to accept byte input.
The text must be encoded before printing to stdout to avoid
unicode errors.

Bug: 1028709
Change-Id: If2a270a7f3f69a818d367616f6732245de364db9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1937500
Reviewed-by: Andy Perelson <ajp@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 71681bf1e8 git-common: Explicitly specify utf-8 when encoding.
Bug: 1012773
Change-Id: I95006ce78b4473c8fb435162089a787b57c0f835
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1850926
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 12a537f932 depot_tools: Run git_common_test in Python 3
Bug: 1009809
Change-Id: Idfcbd26de3420798f092c7fa55a6126d7c389a8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1834317
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Eli Ribble 54434e7e1d Ignore git submodules when calculating dirty files.
This is in keeping with git's default behavior for other porcelain
commands. It also makes it more tenable for projects to introduce
submodules instead of repo manifests without breaking git-cl upload
and similar tools.

Bug: 958499
Test: Run locally
Change-Id: Id9595271bf89aa8ba928026501a4c9487e5abf8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1592572
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Eli Ribble <eliribble@chromium.org>
6 years ago
Raul Tambre c2f74c1698 Make fetch compatible with Python 3
The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 939847
Change-Id: Icada60c5b2cf351d62aead26b7364fcef2c2a3e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1524486
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
6 years ago
Henrique Ferreiro aea45d21ee os.realpath => os.path.realpath in gclient-new-workdir.py
Bug: 721585
Change-Id: Ic6d47201e93cd89a1b58871ef0e3a1b5b708eb47
Reviewed-on: https://chromium-review.googlesource.com/924151
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
7 years ago
Henrique Ferreiro fd4ad24165 Canonicalize paths before linking in gclient-new-workdir.py
This fixes the case where a new workdir is created from a repository
which was previously created with gclient-new-workdir.py and that
repository is later deleted, rendering the symbolic links created by
gclient-new-workdir.py invalid.

It also fixes support_cow() returning 'True' in that case because 'cp
--reflink' does not fail when copying a symlink.


Bug: 721585
Change-Id: I84f4d80b8698af0da346be559d46a328ec0d0e9b
Reviewed-on: https://chromium-review.googlesource.com/842402
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
7 years ago
Bruce Dawson 4bff3fdca7 Make the untracked+ignored warning accurate
If you have too many bytes of untracked+ignored data in your repo then
gclient sync will fail, confidently telling you how many bytes of this
type you have. The problem is, it lies. It reports the level as soon as
it is exceeded, even though it has not finished totaling up the file
sizes. This change makes the reporting accurate.

I noticed this problem because "gclient sync" told me I had 1049.9 MB
of untracked data. I deleted some and it then said I had 1563.9 MB of
untracked data. Hmmm.

Bug: 376099
Change-Id: I797a4279ad666d83c4a5fbd54bdf7ddbf0e7ad84
Reviewed-on: https://chromium-review.googlesource.com/850854
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Mun Yong Jang 781e71e49f [presubmit] Add check to call validation endpoint for config files
Bug:509672
Change-Id: I74bbaa725be829c625cd617c58b3e849acb18102
Reviewed-on: https://chromium-review.googlesource.com/726847
Commit-Queue: Mun Yong Jang <myjang@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
7 years ago
Dan Jacques 209a681f9c [git] Remove hard-coded "depot_tools" Git.
Several tools, including the "git" recipe module, hard-code a
checkout-relative "git.bat" path. Git is a feature that is provided by
the system, both to tooling and recipes:

1) For users, "depot_tools" must be on PATH, and during setup it will
   have installed "git.bat", ensuring that Git tooling is available in
   PATH.
2) For bots, the system is responsible for providing "git.bat" on PATH.
   This is typically done at "/b/depot_tools/git.bat", which is sync'd
   through the "update_scripts" step.

By formally treating Git as a system resource, we absolve Windows bots
and users from manually installing a depot_tools-local Git, bringing
them in line with other platforms.

BUG=chromium:590806
TEST=local

Change-Id: I93e89855cdd330a2ba7a8cfb8117a1789d1ab54e
Reviewed-on: https://chromium-review.googlesource.com/568694
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Francois Doray d42c68114c Add git cl split.
`git cl split` splits a branch into smaller branches and
uploads CLs.

Change-Id: Ic41cdabdd6241008ff48766e31a8d9d07995f2b0
Reviewed-on: https://chromium-review.googlesource.com/439706
Commit-Queue: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Dan Jacques 2f8b0c1d8e git_retry: Disable retries under Git wrapper.
If the Infra Git wrapper is managing a Git execution, "git_retry" will
impose a second set of retries. Recognize this situation and disable
"git_retry" so that the Git wrapper is the sole managing process.

BUG=chromium:703868
TEST=local
  - Ran with and without environment variable, seems to work.

Change-Id: I4f749c9693a761abe2a062ed5f1dc09f51c69e30
Reviewed-on: https://chromium-review.googlesource.com/469229
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Mark Mentovai f548d08a5d Make git blame test pass independently of core.abbrev setting
7-digit hashes are bogus, so I run with core.abbrev = 12.

Non-default settings for core.abbrev caused the git blame test to fail,
because it was hard-coded to look for exactly 7 digits. This change
allows an --abbrev option to be passed to the git-blame wrapper, and
ensures that the same value is used for the git-blame operation and the
computed expectation.

TEST=tests/git_common_test.py GitReadOnlyFunctionsTest.testBlame

Change-Id: I83cbf4dd7267ea36607119bef52f303d59c3f840
Reviewed-on: https://chromium-review.googlesource.com/451124
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
8 years ago
Marc-Antoine Ruel 328b00f95c Fix typo in exclude file name
R=​agable@chromium.org
BUG=

Change-Id: I744627d99454ddc71184b9251cf8a4a309f31b71
Reviewed-on: https://chromium-review.googlesource.com/437663
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Alan Cutter 0001782a88 Include branch name in git-squash-branch's default message
Change-Id: I5dfa6017d1c938f8e1c55fbd6e607909aa4d6811
Reviewed-on: https://chromium-review.googlesource.com/422589
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Alan Cutter <alancutter@chromium.org>
8 years ago
agable 814b1cab2f Remove svn support from smaller git extensions
R=iannucci@chromium.org
BUG=475320

Review-Url: https://codereview.chromium.org/2354313003
8 years ago
qyearsley 12fa6ff69b Run auto-spell-checker (codespell) on files in depot_tools.
This should only change spelling in:
 - messages that are printed
 - comments
 - docstrings

Review-Url: https://codereview.chromium.org/2277513002
9 years ago
iannucci e38699bd95 Fix broken git tests on mac.
Unfortunately there's a bunch of other broken stuff, but it's something :/

R=agable@chromium.org, thakis@chromium.org
BUG=607344

Review-Url: https://codereview.chromium.org/2244023003
9 years ago
iannucci eaca0336ae Fix freeze when running from a non-root directory.
R=agable@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2204423002
9 years ago
Arikon b3a2148c42 Add more error regexps for git retry
BUG=

Review-Url: https://codereview.chromium.org/2165643002
9 years ago
techtonik bf2a34198e Stashing is also an option when copy is dirty for upload
BUG=

Review-Url: https://codereview.chromium.org/2019223002
9 years ago
agable 96e179bba0 Better error checking in git freeze
R=iannucci@chromium.org
BUG=567157

Review-Url: https://codereview.chromium.org/1527403002
9 years ago
agable 02b3c98b76 Make git-freeze bail out if the user has too much untracked data.
R=iannucci@chromium.org
BUG=376099

Review-Url: https://codereview.chromium.org/2052113002
9 years ago
agable 7aa2ddd81d Refactor git_common config and die
R=iannucci@chromium.org
BUG=376099

Review-Url: https://codereview.chromium.org/2075603002
9 years ago
clemensh@chromium.org c3fe99d8b9 Fix ancestor check
Before, for the common case that the actual_merge_base was already set
as base, the check for is_ancestor(base, actual_merge_base) would have
caused the base to be re-set.
This is a writing operation, which causes trouble e.g. for the parallel
operation of 'git cl status'.

R=iannucci@chromium.org, tandrii@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1888213004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300003 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org 596cd5c95d Fix coloring madness in depot_tools.
'setup_color' now contains logic to correctly detect:
  * cmd
  * cmd pipe
  * msys bash
  * msys pipe
  * cmd running inside msys bash (git-command)
  * cmd pipe running inside msys bash (git-command > outfile)

R=brucedawson@chromium.org, dnj@chromium.org
BUG=600049

Review URL: https://codereview.chromium.org/1851283002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299682 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
mgiuca@chromium.org 01d2cde990 git hyper-blame: Added approx. line number translation.
Previously, when a commit was skipped, it would be blamed on the line
number the line had *after* the skipped commit. This could mean a
totally unrelated commit gets blamed. Now, a heuristic analyses the diff
of the skipped commit to discover approximately what line number the
line had *before* the skipped commit, so it can hopefully be blamed on
the right commit.

BUG=574290

Review URL: https://codereview.chromium.org/1629253002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298609 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
mgiuca@chromium.org 819375653b Added git hyper-blame, a tool that skips unwanted commits in git blame.
Currently, the script requires you to pass the unwanted commits on the
command line, but eventually, you could configure it with a file
(checked into the repo) that provides a fixed set of commits to always
skip (such as commits that do a huge amount of renaming and nothing
else).

BUG=574290

Review URL: https://codereview.chromium.org/1559943003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298544 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org 0d9e59c6ce Fix rebase-update on windows on git-svn repos.
Through a comedy of wrapper scripts, the ^ is being swallowed, which
causes the `git config` invocation to match all lines which HAVE
"remote" in them, instead of matching lines which BEGIN with remote.

R=maruel@chromium.org, pkasting@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1566343002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298185 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
scottmg@chromium.org d4218d4d56 Attempt at making git-drover work on Windows
BUG=404755
R=sammc@chromium.org

Review URL: https://codereview.chromium.org/1387223002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297055 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sammc@chromium.org 900a33fb4d Add a git-drover.
This uses the same trick as git-new-workdir to reuse an existing git
checkout without interfering with it. However, this makes it only usable
on platforms where os.symlink exists.

BUG=404755

Review URL: https://codereview.chromium.org/1342383002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296920 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
iannucci@chromium.org 3b4f228f10 Fix git-freeze when using a commit hook which could reject a commit.
This prevents `git rebase-update` from losing work when using a hook like
pre-commit-go.

R=dnj@chromium.org, vadimsh@chromium.org, maruel@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1350043002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296737 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
raphael.kubo.da.costa@intel.com 58d05b0892 Unskip testGetBranchesInfo().
It is not clear why it was skipped in r293502, but it was problematic
before that as it can be seen from CL 802403003.

The reason for the different results (and likely the reason why the test
was skipped) is that the handling of the %(upstream:track) and
%(upstream:trackhort) formatting tags was broken in git itself until
version 2.3.0. This was fixed in git commit b6160d95, and the fix shows
that the test expectations in testGetBranchesInfo() were actually wrong
in one of the cases.

Fix the expectations and make sure we only use %(upstream:track) in the
test when a suitable git version is present.

R=pgervais@chromium.org,iannucci@chromium.org

Review URL: https://codereview.chromium.org/1195933003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295814 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org 25b9ab2c1a When using git-rebase-update, pass --no-verify to git commit.
Otherwise this creates a mess for WIP branches that do not pass the git
pre-commit hook.

R=iannucci@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1179273003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295742 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago