Go to file
Shawn O. Pearce 8ad8a0e61d Change DWIMery hack for dealing with rewound remote branch
The trick of looking at the reflog for the remote tracking branch
and only going back one commit works some of the time, but not all of
the time.  Its sort of relying on the fact that the user didn't use
`repo sync -n` or `git fetch` to only update the tracking branches
and skip the working directory update.

Doing this right requires looking through the history of the SHA-1
source (what the upstream used to be) and finding a spot where the
DAG diveraged away suddenly, and consider that to be the rewind
point.  That's really difficult to do, as we don't have a clear
picture of what that old point was.

A close approximation is to list all of the commits that are in
HEAD, but not the new upstream, and rebase all of those where the
committer email address is this user's email address.  In most cases,
this will effectively rebase only the user's new original work.

If the user is the project maintainer and rewound the branch
themselves, and they don't want all of the commits they have created
to be rebased onto the new upstream, they should handle the rebase
on their own, after the sync is complete.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-05-29 18:45:17 -07:00
docs Remove support for the extra <remote> definitions in manifests 2009-05-19 13:01:52 -07:00
hooks Install a default pre-auto-gc hook in all repositories 2008-11-03 11:00:44 -08:00
subcmds Refactor how projects parse remotes so it can be replaced 2009-05-29 09:31:28 -07:00
.gitignore Initial Contribution 2008-10-21 07:00:00 -07:00
color.py Add -p to repo forall to improve output formatting 2009-04-18 13:49:13 -07:00
command.py Add -p to repo forall to improve output formatting 2009-04-18 13:49:13 -07:00
COPYING Initial Contribution 2008-10-21 07:00:00 -07:00
editor.py Fix launching of editor under 'repo upload --replace' 2009-04-18 16:57:46 -07:00
error.py Report better errors when a project revision is invalid 2009-03-02 12:56:08 -08:00
git_command.py Work around 'ControlPath too long' on Mac OS X 2009-04-21 08:05:27 -07:00
git_config.py Allow callers of GitConfig to specify the pickle file path 2009-05-29 09:31:00 -07:00
git_refs.py Make usage of open safer by setting binary mode and closing fds 2009-04-18 14:48:03 -07:00
git_ssh Automatically use SSH control master support during sync 2009-04-18 16:50:47 -07:00
main.py Refactor Manifest to be XmlManifest 2009-05-29 09:31:28 -07:00
manifest_xml.py Refactor how projects parse remotes so it can be replaced 2009-05-29 09:31:28 -07:00
pager.py Don't start the pager if stdout is a pipe 2009-04-01 07:24:22 -07:00
progress.py Only display a progress meter once we spend 0.5 seconds on a task 2009-04-18 10:09:16 -07:00
project.py Change DWIMery hack for dealing with rewound remote branch 2009-05-29 18:45:17 -07:00
repo Refactor Manifest to be XmlManifest 2009-05-29 09:31:28 -07:00
trace.py Fix repo --trace to show ref and config loads 2009-04-18 09:54:51 -07:00