Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-24 Thread Josh Triplett
On Wed, Aug 24, 2016 at 07:05:17PM +0200, Jakub Narębski wrote: > W dniu 24.08.2016 o 16:20, Josh Triplett pisze: > > On Wed, Aug 24, 2016 at 03:16:56PM +0200, Jakub Narębski wrote: > [...] > >> Not really. > >> > >> The above means only that the support for new syntax would be not > >> as easy as

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-24 Thread Jakub Narębski
W dniu 24.08.2016 o 16:20, Josh Triplett pisze: > On Wed, Aug 24, 2016 at 03:16:56PM +0200, Jakub Narębski wrote: [...] >> Not really. >> >> The above means only that the support for new syntax would be not >> as easy as adding it to 'git rev-parse' (and it's built-in equivalent), >> except for

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-24 Thread Stefan Beller
On Wed, Aug 24, 2016 at 7:20 AM, Josh Triplett wrote: > Depends on which cases you want to handle. In the most general case, > you'd need to find and process the applicable .gitmodules file, which > would only work if you started from the top-level tree, not a random >

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-24 Thread Josh Triplett
On Wed, Aug 24, 2016 at 03:16:56PM +0200, Jakub Narębski wrote: > W dniu 24.08.2016 o 07:36, Junio C Hamano pisze: > > Jakub Narębski writes: > > > >> The point is that submodule has it's own object database. It might > >> be the same as superproject's, but you need to handle

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-24 Thread Jakub Narębski
W dniu 24.08.2016 o 07:36, Junio C Hamano pisze: > Jakub Narębski writes: > >> The point is that submodule has it's own object database. It might >> be the same as superproject's, but you need to handle submodule objects >> being in separate submodule repository anyway.

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-23 Thread Junio C Hamano
Jakub Narębski writes: > The point is that submodule has it's own object database. It might > be the same as superproject's, but you need to handle submodule objects > being in separate submodule repository anyway. Common repository is > just a special case. > > By the way,

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-23 Thread Jakub Narębski
W dniu 23.08.2016 o 08:53, Josh Triplett pisze: > On Mon, Aug 22, 2016 at 08:39:19PM +0200, Jakub Narębski wrote: >> W dniu 21.08.2016 o 16:26, Josh Triplett pisze: >>> On Sun, Aug 21, 2016 at 03:46:36PM +0200, Jakub Narębski wrote: W dniu 21.08.2016 o 00:50, Josh Triplett pisze: > [...]

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-23 Thread Junio C Hamano
Jakub Narębski writes: > Especially that for submodules you need: > > $ git --git-dir=subdir/.git cat-file -p $(git rev-parse HEAD:subdir):file > > (or something like that), assuming that you start in supermodule. > ... > > But perhaps '//' would be better. If the users have

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-23 Thread Josh Triplett
On Mon, Aug 22, 2016 at 08:39:19PM +0200, Jakub Narębski wrote: > W dniu 21.08.2016 o 16:26, Josh Triplett pisze: > > On Sun, Aug 21, 2016 at 03:46:36PM +0200, Jakub Narębski wrote: > >> W dniu 21.08.2016 o 00:50, Josh Triplett pisze: > >>> Currently, if you have a branch "somebranch" that

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-22 Thread Jakub Narębski
W dniu 21.08.2016 o 16:26, Josh Triplett pisze: > On Sun, Aug 21, 2016 at 03:46:36PM +0200, Jakub Narębski wrote: >> W dniu 21.08.2016 o 00:50, Josh Triplett pisze: >>> Currently, if you have a branch "somebranch" that contains a gitlink >>> "somecommit", you can write "somebranch:somecommit" to

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-21 Thread Josh Triplett
On Sun, Aug 21, 2016 at 03:46:36PM +0200, Jakub Narębski wrote: > W dniu 21.08.2016 o 00:50, Josh Triplett pisze: > > Currently, if you have a branch "somebranch" that contains a gitlink > > "somecommit", you can write "somebranch:somecommit" to refer to the > > commit, just like a tree or blob.

Re: Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-21 Thread Jakub Narębski
W dniu 21.08.2016 o 00:50, Josh Triplett pisze: > Currently, if you have a branch "somebranch" that contains a gitlink > "somecommit", you can write "somebranch:somecommit" to refer to the > commit, just like a tree or blob. ("man git-rev-parse" defines this > syntax in the "SPECIFYING

Extending "extended SHA1" syntax to traverse through gitlinks?

2016-08-20 Thread Josh Triplett
Currently, if you have a branch "somebranch" that contains a gitlink "somecommit", you can write "somebranch:somecommit" to refer to the commit, just like a tree or blob. ("man git-rev-parse" defines this syntax in the "SPECIFYING REVISIONS" section.) You can use this anywhere you can use a