Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Reuse existing tabs when opening files from changes tree #1585
Conversation
This requires that when we extract a file to a temp file, that the same file at the same commit is always extracted to the same location. To do this, we use a hash of the file's relative path in the repository and the encoding as the temp directory name, and place the commit sha in the temp file's filename.
Move `GetSha256Hash` into `StringExtensions` as it's needed in >1 place.
Also fix unit test for `no body/>0 file comments` case - it wasn't correct before as it was assigning a body.
|
This is working well. Looks like a couple of stray commits snuck in (e.g. |
|
Looks good, works well. |
This fixes the following issue in #1570:
To test
Implementation
This requires that when we extract a file to a temp file, that the same file at the same commit is always extracted to the same location. To do this, we use a hash of the file's relative path in the repository and the encoding as the temp directory name, and place the commit sha in the temp file's filename.
Depends on #1582
Part of #1491