On Wed, Jan 19, 2022 at 8:18 AM Martin Liška <mli...@suse.cz> wrote:
>
> On 1/19/22 13:49, Martin Jambor wrote:
> > Hi,
> >
> > On Wed, Jan 19 2022, Martin Liška wrote:
> >> On 10/18/21 11:01, Martin Liška wrote:
> >>> On 10/12/21 10:59, Martin Liška wrote:
> >>>> Hello.
> >>>>
> >>>> There's a complete patch that implements both git gcc-descr and 
> >>>> gcc-undesrc
> >>>> and sets corresponding git aliases to use them.
> >>>>
> >>>> Ready to be installed?
> >>>> Thanks,
> >>>> Martin
> >>>
> >>> All right, so Jakub told me at IRC that we doesn't support porting to 
> >>> Python.
> >>> However, he promised supporting the changes I made in the original shell 
> >>> script.
> >>
> >> @Jakub: May I remind this, please?
> >
> > putting the following line in ..git/config seems to do the trick?
> >
> >       gcc-descr = "!f() { if test ${1:-no} = --short; then c=${2:-master}; 
> > r=$(git describe --all --match 'basepoints/gcc-[0-9]*' $c | sed -n 
> > 's,^\\(tags/\\)\\?basepoints/gcc-\\([0-9]\\+\\)-\\([0-9]\\+\\)-g[0-9a-f]*$,r\\2-\\3,p;s,^\\(tags/\\)\\?basepoints/gcc-\\([0-9]\\+\\)$,r\\2-0,p');
> >  elif test ${1:-no} = --full; then c=${2:-master}; r=$(git describe --all 
> > --abbrev=40 --match 'basepoints/gcc-[0-9]*' $c | sed -n 
> > 's,^\\(tags/\\)\\?basepoints/gcc-,r,p'); else c=${1:-master}; r=$(git 
> > describe --all --abbrev=14 --match 'basepoints/gcc-[0-9]*' $c | sed -n 
> > 's,^\\(tags/\\)\\?basepoints/gcc-,r,p'); expr match ${r:-no} '^r[0-9]\\+$' 
> > >/dev/null && r=${r}-0-g$(git rev-parse ${2:-master}); fi; if test -n $r; 
> > then o=$(git config --get gcc-config.upstream); rr=$(echo $r | sed -n 
> > 's,^r\\([0-9]\\+\\)-[0-9]\\+\\(-g[0-9a-f]\\+\\)\\?$,\\1,p'); if git 
> > rev-parse --verify --quiet ${o:-origin}/releases/gcc-$rr >/dev/null; then 
> > m=releases/gcc-$rr; else m=master; fi; git merge-base --is-ancestor $c 
> > ${o:-origin}/$m && \\echo ${r}; fi; }; f"
> >
> > Derived from the following before squashing all the new lines:
> >
> >      if test ${1:-no} = --short; then
> >       c=${2:-master};
> >       r=$(git describe --all --match 'basepoints/gcc-[0-9]*' $c | sed -n 
> > 's,^\\(tags/\\)\\?basepoints/gcc-\\([0-9]\\+\\)-\\([0-9]\\+\\)-g[0-9a-f]*$,r\\2-\\3,p;s,^\\(tags/\\)\\?basepoints/gcc-\\([0-9]\\+\\)$,r\\2-0,p');
> >      elif test ${1:-no} = --long; then
> >       c=${2:-master};
> >       r=$(git describe --all --abbrev=40 --match 'basepoints/gcc-[0-9]*' $c 
> > | sed -n 's,^\\(tags/\\)\\?basepoints/gcc-,r,p');
> >      else
> >       c=${1:-master};
> >       r=$(git describe --all --abbrev=14 --match 'basepoints/gcc-[0-9]*' $c 
> > | sed -n 's,^\\(tags/\\)\\?basepoints/gcc-,r,p');
> >       expr match ${r:-no} '^r[0-9]\\+$' >/dev/null && r=${r}-0-g$(git 
> > rev-parse ${2:-master});
> >      fi;
> >      if test -n $r; then
> >       o=$(git config --get gcc-config.upstream);
> >       rr=$(echo $r | sed -n 
> > 's,^r\\([0-9]\\+\\)-[0-9]\\+\\(-g[0-9a-f]\\+\\)\\?$,\\1,p');
> >       if git rev-parse --verify --quiet ${o:-origin}/releases/gcc-$rr 
> > >/dev/null; then
> >           m=releases/gcc-$rr;
> >       else
> >           m=master;
> >       fi;
> >       git merge-base --is-ancestor $c ${o:-origin}/$m && \\echo ${r};
> >      fi;
>
> Anyway, can we please put the nicely formatted bash script to 
> contrib/git-describe.sh (contrib/git-undescribe.sh), having that squashed
> to one line is just crazy.
>
> Martin, can you please do that?
>
> >
> >
> > (And if you wanted to ask then no, I am not touching
> > contrib/gcc-git-customization.sh, not even with a long pole, it scares
> > me :-)
>
> Sure, I can then adjust it if we end up with an outlined version where to code
> sits in proper .sh files.
>
> Martin
>
> >
> > Martin
> >
>

Hi, while people are modifying contrib/gcc-git-customization.sh, could
I get someone to take a look at bug 102644, too?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102664
Thanks,
Eric

Reply via email to