Homec4science

Remove leading "/" so that "git cat-file" works

Authored by Jason Ge <jungejason@fb.com> on Jun 24 2012, 11:45.

Description

Remove leading "/" so that "git cat-file" works

Summary:
When the absolute path is used for load file (loadFileContent(()), it fails in git. For example:

/var/repo/page_admin_app
> git cat-file blob '4d6c03923006d6c444660f2c734fe03e10fd20bd':'/ios/PageAdminApp/Resources/splash/De           fault-Portrait@2x~ipad.png'
fatal: Not a valid object name 4d6c03923006d6c444660f2c734fe03e10fd20bd:/ios/PageAdminApp/Resources/s           plash/Default-Portrait@2x~ipad.png

This is breaking the auto-closing for about 8 revisions like

https://phabricator.fb.com/rPPA4d6c03923006d6c444660f2c734fe03e10fd20bd ...
https://phabricatorcator.fb.com/rPPA51acb7e482aab0c491b530ed19dddc741d50f673 ...

Test Plan:

  • verified that without leading '/', loadFileContent for svn still works. Both of the following commands worked (note the double '/' right before 'tfb':

    svn cat svn+ssh://svn.vip.facebook.com/svnroot//tfb/trunk/www/flib/intern/cachearchiver/regenerators/wurfl/CacheArchiveWurflRegenerator.php@579700 svn cat svn+ssh://svn.vip.facebook.com/svnroot/tfb/trunk/www/flib/intern/cachearchiver/regenerators/wurfl/CacheArchiveWurflRegenerator.php@579700

Reviewers: vrana

Reviewed By: vrana

CC: nh, aran, epriestley

Differential Revision: https://secure.phabricator.com/D2847

Details

Committed
Jason Ge <jungejason@fb.com>Jun 26 2012, 20:58
Pushed
aubortJan 31 2017, 17:16
Parents
rPH2b946459b590: Inform user about associated accounts in failed login
Branches
Unknown
Tags
Unknown

Event Timeline

Jason Ge <jungejason@fb.com> committed rPHb644a2c3a707: Remove leading "/" so that "git cat-file" works (authored by Jason Ge <jungejason@fb.com>).Jun 26 2012, 20:58