[ipxe-devel] Can't revert 6324bd commit

Shao Miller sha0.miller at gmail.com
Tue Dec 4 08:22:36 UTC 2012


Suppose I have a series of commit A, B, C.  Suppose commit C depends on code
that was introduced in commit A.  If I try to revert commit A, then C no
longer makes sense, since the code from A is missing.

You can either roll all the way back to A with 'git checkout', or use the
output of 'git status' to figure out which files depended on the code
introduced in commit A, then modify them accordingly.

You could also explain why you are trying to revert that commit.  So far,
this seems like more of a 'git' question than an iPXE one.

- Shao Miller

________________________________________
From: hai wu [mailto:haiwu.us at gmail.com] 
Sent: Tuesday, December 04, 2012 02:16
To: Shao Miller
Cc: ipxe-devel at lists.ipxe.org
Subject: Re: [ipxe-devel] Can't revert 6324bd commit

Shao,

It is very easy to reproduce this:

Here is the outputs:

$git clone git://git.ipxe.org/ipxe.git
Cloning into 'ipxe'...
remote: Counting objects: 37849, done.
remote: Compressing objects: 100% (13276/13276), done.
remote: Total 37849 (delta 28137), reused 31197 (delta 23021)
Receiving objects: 100% (37849/37849), 9.27 MiB | 468 KiB/s, done.
Resolving deltas: 100% (28137/28137), done.

$ cd ipxe

$ git status
# On branch master
nothing to commit (working directory clean)

$git revert -n 6324bd
error: could not revert 6324bd9... [undi] Allow underlying PXE stack to
construct link-layer header
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'

$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#    modified:   src/arch/i386/drivers/net/undinet.c
#    modified:   src/net/ethernet.c
#
# Unmerged paths:
#   (use "git reset HEAD <file>..." to unstage)
#   (use "git add/rm <file>..." as appropriate to mark resolution)
#
#    both modified:      src/include/ipxe/ethernet.h
#

I am not sure how to workaround this. I could revert that commit until a
certain git commit number, then it would always fail if trying to revert
6324bd. 

Thanks,
On Tue, Dec 4, 2012 at 12:53 AM, Shao Miller <sha0.miller at gmail.com> wrote:
Good day to you.

This does not appear to be an error with iPXE.  This appears to be an error
with what you are doing with 'git'.  You can look at 'git status' after your
failing command to see more about what files are involved.  - Shao

________________________________________
From: ipxe-devel-bounces at lists.ipxe.org
[mailto:ipxe-devel-bounces at lists.ipxe.org] On Behalf Of hai wu
Sent: Monday, December 03, 2012 01:52
To: ipxe-devel at lists.ipxe.org
Subject: [ipxe-devel] Can't revert 6324bd commit

Before "git revert -n 6324bd" worked fine, but with latest ipxe git
checkout, this command fails with the following message:

error: could not revert 6324bd9... [undi] Allow underlying PXE stack to
construct link-layer header
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'

Not sure if there could be some workaround to the above.





More information about the ipxe-devel mailing list