Re: [PATCH] submodule: spell out API of submodule_move_head

2017-10-09 Thread Junio C Hamano
Jonathan Nieder writes: > All that said, I want this function to go away completely. :) Oh, if you are planning to replace it with something else, then I wouldn't bother wasting my time trying to understand the updated comment, or making it more understandable by others.

Re: [PATCH] submodule: spell out API of submodule_move_head

2017-10-09 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder writes: >> Junio C Hamano wrote: >>> This is not a new issue (the removed comment did not mention this at >>> all), but is it correct to say that updates to "index and work tree" >>> was as if we did "git -C $path checkout new" (and of course, HEAD in >>> t

Re: [PATCH] submodule: spell out API of submodule_move_head

2017-10-09 Thread Junio C Hamano
Jonathan Nieder writes: >> This is not a new issue (the removed comment did not mention this at >> all), but is it correct to say that updates to "index and work tree" >> was as if we did "git -C $path checkout new" (and of course, HEAD in >> the $path submodule must be at 'old')? > > I don't und

Re: [PATCH] submodule: spell out API of submodule_move_head

2017-10-09 Thread Jonathan Nieder
Junio C Hamano wrote: > Stefan Beller writes: >> +/** >> + * Move the HEAD and content of the active submodule at 'path' from object >> id >> + * 'old' to 'new'. >> + * >> + * Updates the submodule at 'path' and files in its work tree to commit >> + * 'new'. The commit previously pointed to by t

Re: [PATCH] submodule: spell out API of submodule_move_head

2017-10-09 Thread Junio C Hamano
Stefan Beller writes: > +/** > + * Move the HEAD and content of the active submodule at 'path' from object id > + * 'old' to 'new'. > + * > + * Updates the submodule at 'path' and files in its work tree to commit > + * 'new'. The commit previously pointed to by the submodule is named by > + * 'ol

Re: [PATCH] submodule: spell out API of submodule_move_head

2017-10-09 Thread Jonathan Nieder
Stefan Beller wrote: > This way users of this function do not need to read the implementation to > know what it will do. > > Signed-off-by: Jonathan Nieder > Signed-off-by: Stefan Beller > --- > submodule.c | 5 - > submodule.h | 18 ++ > 2 files changed, 18 insertions(+),

[PATCH] submodule: spell out API of submodule_move_head

2017-10-09 Thread Stefan Beller
This way users of this function do not need to read the implementation to know what it will do. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- submodule.c | 5 - submodule.h | 18 ++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/submodule.