Date: Tue, 29 Dec 2020 13:15:03 +0100 From: "Kristof Provost" <kp@FreeBSD.org> To: monochrome <monochrome@twcny.rr.com> Cc: freebsd-current@freebsd.org Subject: Re: git and the loss of revision numbers Message-ID: <84B2B085-97FD-4C63-96C5-0B65371060B7@FreeBSD.org> In-Reply-To: <8fb16182-e590-6bf0-747f-bc820dea1a3e@twcny.rr.com> References: <54116640-E6A1-4C53-9D7E-4384F942628E@ellael.org> <8ABAC674-89AA-47BE-996C-4DF6E7713F21@ellael.org> <53dd689b-2401-8e90-f332-50c60c549c2e@FreeBSD.org> <CAPyFy2DW0YDUK%2Bkir2H_e8LVT-P-kQ0PMmKQO6m%2B016Wb=Hd0A@mail.gmail.com> <1d1e2003-0cc1-6e67-0ceb-f0fcba03f8f7@twcny.rr.com> <6a83684d-ee5b-5002-3553-7b383f02768c@nomadlogic.org> <8fb16182-e590-6bf0-747f-bc820dea1a3e@twcny.rr.com>
index | next in thread | previous in thread | raw e-mail
On 29 Dec 2020, at 4:33, monochrome wrote: > sry forgot details: > > source tree @ ead01bfe8 > > git -C /usr/src checkout gf20c0e331 > error: pathspec 'gf20c0e331' did not match any file(s) known to git > > what is the 'g' for? > That would have been a typo, I think. > git -C /usr/src checkout f20c0e331 > M sys/amd64/conf/GENERIC > HEAD is now at f20c0e331 caroot: drop $FreeBSD$ expansion from root > bundle > > yet I don't see any indication that anything changed, and now it wont > update at all: > If something went wrong there’d be error output. Git is *fast*, which can lead you to assume it’s not done anything when it has in fact done exactly what you asked. You should be on that commit now. > git -C /usr/src pull --ff-only > You are not currently on a branch. > Please specify which branch you want to merge with. > See git-pull(1) for details. > > git pull <remote> <branch> Yes, you can’t merge to a detached head. Return to your original branch (presumably git checkout main) and then pull. Regards, Kristof From owner-freebsd-current@freebsd.org Tue Dec 29 13:28:44 2020 Return-Path: <owner-freebsd-current@freebsd.org> Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C22A4BEDA3 for <freebsd-current@mailman.nyi.freebsd.org>; Tue, 29 Dec 2020 13:28:44 +0000 (UTC) (envelope-from monochrome@twcny.rr.com) Received: from p-impout005.msg.pkvw.co.charter.net (p-impout005aa.msg.pkvw.co.charter.net [47.43.26.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4wGz1Qhtz4YtS for <freebsd-current@freebsd.org>; Tue, 29 Dec 2020 13:28:42 +0000 (UTC) (envelope-from monochrome@twcny.rr.com) Received: from [192.168.13.11] ([45.47.33.158]) by cmsmtp with ESMTP id uF3JkchoFiNLEuF3Jk5QZZ; Tue, 29 Dec 2020 13:28:41 +0000 X-Authority-Analysis: v=2.3 cv=QJYWuTDL c=1 sm=1 tr=0 a=VvwePSPmDFBOGFNvGtd2Cw==:117 a=VvwePSPmDFBOGFNvGtd2Cw==:17 a=IkcTkHD0fZMA:10 a=6I5d2MoRAAAA:8 a=veNgSRtZSUSFm_0Aq-8A:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 Subject: Re: git and the loss of revision numbers To: freebsd-current@freebsd.org References: <54116640-E6A1-4C53-9D7E-4384F942628E@ellael.org> <8ABAC674-89AA-47BE-996C-4DF6E7713F21@ellael.org> <53dd689b-2401-8e90-f332-50c60c549c2e@FreeBSD.org> <CAPyFy2DW0YDUK+kir2H_e8LVT-P-kQ0PMmKQO6m+016Wb=Hd0A@mail.gmail.com> <1d1e2003-0cc1-6e67-0ceb-f0fcba03f8f7@twcny.rr.com> <6a83684d-ee5b-5002-3553-7b383f02768c@nomadlogic.org> <8fb16182-e590-6bf0-747f-bc820dea1a3e@twcny.rr.com> <84B2B085-97FD-4C63-96C5-0B65371060B7@FreeBSD.org> From: monochrome <monochrome@twcny.rr.com> Message-ID: <755854ef-63bf-ad8f-f6a0-6af194e98bd6@twcny.rr.com> Date: Tue, 29 Dec 2020 08:28:40 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <84B2B085-97FD-4C63-96C5-0B65371060B7@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfNWf+qWXTS/M07l/bKQfiNpiKZc/CjCSenH+h9cGv/IetpWW9Xz+C+DRzPymexLL78Xj9N3R0hV9Gb6a7+k46nEo6ZvpojrC5N6Xn5d7I8PRXPjnPjno bC2di7jjtVO6ierOdp4pk15Gq5/KQSdJ0739dXBxbbmhYJcdiMxGWKkYR/UHf35VRsG0nf9FzTWAQw== X-Rspamd-Queue-Id: 4D4wGz1Qhtz4YtS X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.30 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[45.47.33.158:received]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[47.43.26.136:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:47.43.26.0/24]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[rr.com]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[47.43.26.136:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:40294, ipnet:47.43.24.0/21, country:US]; MIME_TRACE(0.00)[0:+]; MAILMAN_DEST(0.00)[freebsd-current]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current <freebsd-current.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/> List-Post: <mailto:freebsd-current@freebsd.org> List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 29 Dec 2020 13:28:44 -0000 On 12/29/20 7:15 AM, Kristof Provost wrote: > On 29 Dec 2020, at 4:33, monochrome wrote: >> sry forgot details: >> >> source tree @ ead01bfe8 >> >> git -C /usr/src checkout gf20c0e331 >> error: pathspec 'gf20c0e331' did not match any file(s) known to git >> >> what is the 'g' for? >> > That would have been a typo, I think. > the g is also in the uname output: main-c421-gf20c0e331-dirty >> git -C /usr/src checkout f20c0e331 >> M sys/amd64/conf/GENERIC >> HEAD is now at f20c0e331 caroot: drop $FreeBSD$ expansion from root >> bundle >> >> yet I don't see any indication that anything changed, and now it wont >> update at all: >> > If something went wrong there’d be error output. > Git is *fast*, which can lead you to assume it’s not done anything when > it has in fact done exactly what you asked. You should be on that commit > now. > that was the full output, and nothing showing that it changed/reverted any files, and the contents of /usr/src/.git/refs/heads/main is still ead01bfe8618e879b3b23c6cf9f026eadcc7d2b3 is there another place to find the current revision of the source? the point here is to revert to a previous known working state of the source tree exactly like svnlite update -rXXXXXX /usr/src used to do, and svn could then update from that point again with the same command used to do regular update: svnlite update /usr/src >> git -C /usr/src pull --ff-only >> You are not currently on a branch. >> Please specify which branch you want to merge with. >> See git-pull(1) for details. >> >> git pull <remote> <branch> > > Yes, you can’t merge to a detached head. Return to your original branch > (presumably git checkout main) and then pull. > > Regards, > Kristof > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" the point is, there are only 4 commands we need to do this entire thing and it should be ironed out: 1. initially download the source tree 2. get the current local source tree revision 3. update the local source tree 4. revert local source tree to previous state thanks for your input!help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84B2B085-97FD-4C63-96C5-0B65371060B7>
