2

我正在编写一个小型 Web Git 可视化工具,我想转换文件路径和分支:

master repository/folder/test => a39bc19d82890f25df2d08d8bea627bb4354e8d8
mybranch repository/folder/test/myfile.py => 76e2242459d360f7429ed748426e660b6dacc9a9

进入 Git 对象哈希,所以我可以正确使用git showand git cat-file,以及git ls-tree. 我的应用目前看起来像这样:

show.php?h=76e2242459d360f7429ed748426e660b6dacc9a9

我想将路径转换为更有用的东西,例如:

show.php?branch=master&path=repository/folder/test/myfile.py

有任何想法吗?

4

1 回答 1

0

分支:路径符号是解决方案。感谢努法尔·易卜拉欣!

于 2012-05-22T06:06:35.307 回答