mirror of
https://github.com/expo/fbshipit.git
synced 2026-11-15 17:33:57 -10:00
Summary: Currently, the stripping of the file list from Git messages only works for messages that include a summary. For instance: ``` This is my Git message title. Some summary for my git commit. -- [ file list here ] ``` However, when syncing commits that only have a single line, and have no commit message, the file list is included because it can't find a new line prior to the "---". This commit replaces this functionality to include a regex that looks at the beginning of the message, and then does a substr to determine the commit message. Closes https://github.com/facebook/fbshipit/pull/13 Differential Revision: D3394057 Pulled By: fredemmott fbshipit-source-id: 443d6af7afcee18a2c6aaf54b3dbb7fee046a416
Diffs should be exported in the same way that the ShipItRepo does - for example:
$ hhvm -m debug
Welcome to HipHop Debugger!
Type "help" or "?" for a complete list of commands.
hphpd> require_once('./autoload.php')
hphpd> $repo = new ShipItRepoGIT('/tmp/gittest', HH\ImmVector { '' })
hphpd> $patch = $repo->getNativePatchFromID('f9f3f5645604ab1d95c21a7825a8f73948661f62')
hphpd> file_put_contents('tests/git-diffs/file-to-symlink.diff', $patch)