git-repo/subcmds
Mike Frysinger 5e2f32fe13 init: reset hard to --repo-rev
When updating the tracking ref to whatever the user requested,
make sure we reset state completely rather than trying to update
the ref to it.  This avoids confusing git as to the current state
of the tree, and is more inline with user intentions: if they made
a local change to the checkout, but ran repo init with a specific
rev, we shouldn't stay wedged forever until they manually clean it
all up.

Bug: https://crbug.com/gerrit/12801
Change-Id: Ieba8d9c15781b4d0649bf01c7460694da63387b2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/290923
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
2020-12-06 21:46:30 +00:00
..
__init__.py subcmds: stop instantiating at import time 2020-03-17 00:08:52 +00:00
abandon.py abandon: add support for --quiet 2020-02-20 06:14:00 +00:00
branches.py Fix blank line issues reported by flake8 2020-02-12 06:36:40 +00:00
checkout.py Fix blank line issues reported by flake8 2020-02-12 06:36:40 +00:00
cherry_pick.py Fix blank line issues reported by flake8 2020-02-12 06:36:40 +00:00
diff.py diff: delete unused nested func 2020-02-17 23:49:47 +00:00
diffmanifests.py manifest_xml: refactor manifest parsing from client management 2020-11-18 19:10:57 +00:00
download.py download: add a --branch option 2020-03-23 00:31:10 +00:00
forall.py Expose upstream and dest-branch attributes through environment 2020-04-16 18:42:53 +00:00
gitc_delete.py flake8: Suppress "F821 undefined name" inline for Python 2 names 2020-02-15 04:45:16 +00:00
gitc_init.py pyflakes: Fix remaining "E501 line too long" warnings 2020-02-13 04:54:10 +00:00
grep.py drop old git_require checks 2020-02-12 11:44:59 +00:00
help.py manifest_xml: refactor manifest parsing from client management 2020-11-18 19:10:57 +00:00
info.py manifest_xml: refactor manifest parsing from client management 2020-11-18 19:10:57 +00:00
init.py init: reset hard to --repo-rev 2020-12-06 21:46:30 +00:00
list.py Fix blank line issues reported by flake8 2020-02-12 06:36:40 +00:00
manifest.py manifest: add a --json output option 2020-11-17 01:38:00 +00:00
overview.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
prune.py Fix blank line issues reported by flake8 2020-02-12 06:36:40 +00:00
rebase.py avoid negative variables 2020-02-19 00:24:43 +00:00
selfupdate.py avoid negative variables 2020-02-19 00:24:43 +00:00
smartsync.py Fix blank line issues reported by flake8 2020-02-12 06:36:40 +00:00
stage.py Fix blank line issues reported by flake8 2020-02-12 06:36:40 +00:00
start.py Fix blank line issues reported by flake8 2020-02-12 06:36:40 +00:00
status.py manifest_xml: refactor manifest parsing from client management 2020-11-18 19:10:57 +00:00
sync.py sync: respect --force-sync when fetching manifest project updates 2020-11-17 03:06:06 +00:00
upload.py Concentrate the RepoHook knowledge in the RepoHook class 2020-11-23 09:59:16 +00:00
version.py version: include tag commit date for easy reference 2020-03-31 03:27:57 +00:00