questions about git-mktree

4 messages, 4 authors, 2016-06-15 · open the first message on its own page

questions about git-mktree

From: Jon Seymour <hidden>
Date: 2016-06-15 22:46:44

Uwe,

Thanks for your explanation.

Does git-mktree normalize the sort order of the input or take it as it
is? I can see  a case for having it do normalization, if it doesn't
already and probably for this to be the default behaviour.

Also, I have a need for something like git-mktree that takes a
recursive git-lstree output as input.

Junio:  assuming these features don't exist already, are you open to
the idea of accepting patches that add them?

Regards,

jon.

Re: questions about git-mktree

From: Uwe Kleine-König <hidden>
Date: 2016-06-15 22:46:44

Hello Jon,

On Sun, May 10, 2009 at 11:41:17PM +1000, Jon Seymour wrote:
Thanks for your explanation.

Does git-mktree normalize the sort order of the input or take it as it
is? I can see  a case for having it do normalization, if it doesn't
already and probably for this to be the default behaviour.
As git-mktree doesn't exists I cannot answer that question ...

Anyhow, another possibility to construct a tree is using the (or an)
index.

git-update-index --add --cacheinfo <mode> <object> <file> becomes handy
for constructing trees.

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

Re: questions about git-mktree

From: A Large Angry SCM <hidden>
Date: 2016-06-15 22:46:44

Uwe Kleine-König wrote:
As git-mktree doesn't exists I cannot answer that question ...
http://kernel.org/pub/software/scm/git/docs/git-mktree.html

Re: questions about git-mktree

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:46:44

Uwe Kleine-König    [off-list ref] writes:
Hello Jon,

On Sun, May 10, 2009 at 11:41:17PM +1000, Jon Seymour wrote:
quoted
Thanks for your explanation.

Does git-mktree normalize the sort order of the input or take it as it
is? I can see  a case for having it do normalization, if it doesn't
already and probably for this to be the default behaviour.
As git-mktree doesn't exists I cannot answer that question ...
$ ls $(git --exec-path)/git-mktree
/usr/libexec/git-core/git-mktree

Examining mktree.c a bit you can see that there is qsort using
ent_compare in write_tree procedure.  It is not long file: 131 lines.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help