author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 6 Feb 2007 21:08:06 +0000 (16:08 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 6 Feb 2007 21:08:06 +0000 (16:08 -0500) | ||
commit | 7073e69e382bc8247c28859d8b0eda2612cd6b94 | |
tree | b4e0cd34461796e03686090a594c9f1ee07d9290 | tree | snapshot |
parent | 63e0c8b364e334fc7cc975edf1f16fb4c89594b3 | commit | diff |
Don't do non-fastforward updates in fast-import.
If fast-import is being used to update an existing branch of
a repository, the user may not want to lose commits if another
process updates the same ref at the same time. For example, the
user might be using fast-import to make just one or two commits
against a live branch.
We now perform a fast-forward check during the ref updating process.
If updating a branch would cause commits in that branch to be lost,
we skip over it and display the new SHA1 to standard error.
This new default behavior can be overridden with `--force`, like
git-push and git-fetch.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
If fast-import is being used to update an existing branch of
a repository, the user may not want to lose commits if another
process updates the same ref at the same time. For example, the
user might be using fast-import to make just one or two commits
against a live branch.
We now perform a fast-forward check during the ref updating process.
If updating a branch would cause commits in that branch to be lost,
we skip over it and display the new SHA1 to standard error.
This new default behavior can be overridden with `--force`, like
git-push and git-fetch.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Documentation/git-fast-import.txt | diff | blob | history | |
fast-import.c | diff | blob | history | |
t/t9300-fast-import.sh | diff | blob | history |