Re: [PATCH] Avoid errors from git-rev-parse in gitweb blame

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

 



Rafael Garcia-Suarez wrote:
git-rev-parse will abort with an error when passed a non-existent
revision spec, [...]

-		open (my $dd, "-|", git_cmd(), "rev-parse", "$full_rev^")
+		open (my $dd, "-|", git_cmd(), "rev-parse", '--revs-only', "$full_rev^")

This is no formal objection, but it would be nice if you could at the same time add a comment to the code that explains this -- like "do not fail [or 'barf on stderr'] if there is no parent revision". Makes it easier to change it later, since "--revs-only" is not particularly obvious. :)

-- Lea
--
To unsubscribe from this list: 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]

  Powered by Linux