Instead of pushing a new change, I should have pushed a replacement patch to the first change you already had. Containing the contents of both the first patch and the fix.
If the new patch is a fix on top of the first one and you want to keep them separate, then yes, you must merge the first change before you're able to merge the second one.
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
----------------------------------------------------------------------
[FAILED] build/ mytest_amend (Upload failed)
----
And the git log graph is:
----
testuser@testuser2:/media/linux/t/mtk/build$ git log --all --graph
* commit 7569a3181a69ff8f92cbcd70275b219eec3ece3c
| Author: testuser <test...@mycompany.com>
| Date: Thu Feb 24 11:59:10 2011 +0800
|
| --amend test step 1,now add step 2
|
| Change-Id: Ia11c652c91c22b68fff5beebf2e578a4534e297f
|
| * commit 49969b735eafe1d59738bd74272ddac763b355fd
|/ Author: testuser <test...@mycompany.com>
| Date: Thu Feb 24 11:59:10 2011 +0800
|
| --amend test step 1
|
| Change-Id: Ia11c652c91c22b68fff5beebf2e578a4534e297f
|
* commit 7c6d302691e226e0d9d7c78c9991892ddb087796
Author: testuser <test...@mycompany.com>
Date: Fri Feb 11 16:42:51 2011 +0800
init with build
----
So have I made some mistake?
And the change-id after amend is same.
On Tue, Feb 22, 2011 at 11:41 PM, Luciano Carvalho <lsca...@gmail.com> wrote:
> Not merge, but squash.
> Squash the commits keeping the first Change-Id in the commit message, then
> repo upload.
>
> On Feb 22, 2011 1:51 AM, "Chunlin Zhang" <zhangc...@gmail.com> wrote:
>> On Mon, Feb 21, 2011 at 10:56 PM, Luciano Carvalho <lsca...@gmail.com>
>> wrote:
>>> Instead of pushing a new change, I should have pushed a replacement patch
>>> to
>>> the first change you already had. Containing the contents of both the
>>> first
>>> patch and the fix.
>> So I should "repo start" a new branch,merge previous commit and the
>> issue-fixed commit to one,then "repo upload"?
>> I will try this way.
Git squash means "git commit --amend",is it?
I try this way,but at last fail.
Fail message:
----
testuser@testuser2:/media/linux/t/mtk$ repo upload
Upload project build/:
branch mytest_amend ( 1 commit, Thu Feb 24 13:20:40 2011 +0800):
7569a318 --amend test step 1,now add step 2
to 10.125.3.11:8080 (y/n)? y
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 370 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
To ssh://test...@10.125.3.11:29418/platform/build
! [remote rejected] mytest_amend -> refs/for/master (no new changes)
error: failed to push some refs to
'ssh://test...@10.125.3.11:29418/platform/build'
----------------------------------------------------------------------
[FAILED] build/ mytest_amend (Upload failed)
----
And the git log graph is:
----
testuser@testuser2:/media/linux/t/mtk/build$ git log --all --graph
* commit 7569a3181a69ff8f92cbcd70275b219eec3ece3c
| Author: testuser <test...@mycompany.com>
| Date: Thu Feb 24 11:59:10 2011 +0800
|
| --amend test step 1,now add step 2
|
| Change-Id: Ia11c652c91c22b68fff5beebf2e578a4534e297f
|
| * commit 49969b735eafe1d59738bd74272ddac763b355fd
|/ Author: testuser <test...@mycompany.com>
| Date: Thu Feb 24 11:59:10 2011 +0800
|
| --amend test step 1
|
| Change-Id: Ia11c652c91c22b68fff5beebf2e578a4534e297f
|
* commit 7c6d302691e226e0d9d7c78c9991892ddb087796
Author: testuser <test...@mycompany.com>
Date: Fri Feb 11 16:42:51 2011 +0800
init with build
----
So have I made some mistake?
And the change-id after amend is same.
Yes,this way is also OK for squash.
After remove the change-id line,gerrit treat the commit after amend as
a different commit.
Thank you!
> -Ragesh