Page MenuHomePhabricator

Git version not included in special version for some extensions
Closed, InvalidPublic

Description

For extensions that does not use the usual directory layout the git change hash does not show up as usual.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=36224
https://bugzilla.wikimedia.org/show_bug.cgi?id=42778

Details

Reference
bz43986

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:16 AM
bzimport set Reference to bz43986.
bzimport added a subscriber: Unknown Object (MLST).
		// Allow a hook to add/remove items.
		wfRunHooks( 'SoftwareInfo', array( &$software ) );

function getCreditsForExtension( array $extension ) {

		$name = isset( $extension['name'] ) ? $extension['name'] : '[no name]';

		$vcsText = false;

		if ( isset( $extension['path'] ) ) {
			$gitInfo = new GitInfo( dirname( $extension['path'] ) );
			$gitHeadSHA1 = $gitInfo->getHeadSHA1();

Should probably just add a hook in there somewhere. Maybe. Or a 'gitpath' property or something:

'gitpath' => dirname( DIR ),

And then check both (with gitpath having priority over path) for which to use

Change I8e6fe417: (Bug 43986) Check parent directory for the .git directory

GitInfo newer checks the directory, it just assumes it to be correct.

This should be handled in some other way.