Re: [PATCH/RFC] gitweb: Great subroutines renaming

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

 



Jakub Narebski wrote:

> With two scripts attached to the first post in this thread it would be
> simple to apply pre-rename patch, by converting gitweb to pre-rename using
> gitweb-unrename.sh script, then applying patch, then restoring new names
> using gitweb-rename.sh script, and finally comitting changes (or amending
> commit).

Or just apply corrected gitweb-rename.sh script (see below) to patch (mbox),
and then apply and commit the "after rename" patch.

#!/bin/sh

if test -z "$1"; then
        FILE=`git rev-parse --show-cdup`gitweb/gitweb.perl
else
        FILE=$1
fi

echo "Great subroutine renaming: $FILE"
perl -s -p -i.re~ \
        -e 's/\bgit_get_referencing\b/format_mark_referencing/;' \
        -e 's/\bgit_read_head\b/git_get_head/;' \
        -e 's/\bread_info_ref\b/git_read_info_refs/;' \
        -e 's/\bdate_str\b/parse_date/;' \
        -e 's/\bgit_read_tag\b/parse_tag/;' \
        -e 's/\bgit_read_commit\b/parse_commit/;' \
        -e 's/\bgit_blob_plain_mimetype\b/blob_plain_mimetype/;' \
        -e 's/\bgit_page_nav\b/git_print_page_nav/;' \
        -e 's/\bgit_header_div\b/git_print_header_div/;' \
        "$FILE"

# end of gitweb-rename.sh

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]