archlinuxfr / yaourt

[unmaintained] A Pacman frontend with more features and AUR support
599 stars 98 forks source link

fatal: bad revision, when using AURSHOWDIFF=1 and only one commit in AUR #351

Open He-Ro opened 7 years ago

He-Ro commented 7 years ago

I have a package (grobi-git) installed from a PKGBUILD, that was previously not on the AUR. Now it has been added to the AUR and there is only one commit in the AUR git repository. I get the following error when the PKGBUILD diff should be shown:

==> Downloading grobi-git PKGBUILD from AUR...                           
Cloning into '.'...                 
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
grobi-git r72.f02831d-1  (2017-09-26 07:53)                              

fatal: bad revision 'HEAD^..HEAD'   

( Unsupported package: Potentially dangerous ! )                         
==> Edit PKGBUILD ? [Y/n] ("A" to abort)                                 
==> ------------------------------------                                 
==>

I have the following two lines in my yaourtrc:

AURSHOWDIFF=1
AURUSEGIT=1

The revision HEAD^ does not exist, so the diff does not make sense (or show a diff comparing the HEAD to an empty file).