findutils-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Findutils-patches] Automatically-generated regexp documentation


From: Eric Blake
Subject: Re: [Findutils-patches] Automatically-generated regexp documentation
Date: Tue, 25 Oct 2016 09:26:03 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 10/21/2016 03:17 PM, Eric Blake wrote:
> At any rate, I'll post the commands I used to make the conversion, once
> it is complete; here's my starting point.
> 
> $ git fsck 2>&1 | sed -n 's/error in tag \([^:]*\).*/\1/p' > broken

Here's the final steps I used; the findutils.git repository is now
clean, using a script graciously provided by Kyle J. McKay, where the
attached file 'broken' is the list of tags that I fixed:

$ # get the cleanup script
$ wget
https://gist.githubusercontent.com/mackyle/9ea081513f6b90bb4470b7b2bc6e4bce/raw/7f1814a5b9823278852731e7f13e717937dffec2/export-fixed-tags
$ chmod +x export-fixed-tags
$ # create fresh clone, so none of my local tags get pushed
$ git clone git://git.sv.gnu.org/findutils.git findutils-cleanup
$ cd findutils-cleanup
$ # fix up the repository, creating a backdated tag for every broken tag
$ ../export-fixed-tags | git fast-import
processing invalid tag refs/tags/FINDUTILS-4_1-10
...
skipping OK tag refs/tags/v4.6.0 (v4.6.0)
git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects:       5000
Total objects:           97 (         0 duplicates                  )
...
$ # 97 tags were replaced; grab their names into 'broken'
$ git push -n --tags 2>&1 | \
  sed -n 's/.* \([a-zA-Z0-9_-]*\) .already.*/\1/p' > broken
$ # delete the old tags, then push the fixed ones
$ git push origin $(sed s/^/:/ broken)
$ git push --tags


If you have previously checked out the repository, you will NOT get the
updated tags unless you FIRST delete all the broken tags you have
previously downloaded.  If you want to clean things up locally, you can
use the following steps:

$ git tag -d $(cat broken)
$ git fetch origin --tags

You can then use git prune to remove the now-dangling broken tags.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: broken
Description: Text document

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]