* git-write-tree strangeness @ 2007-08-08 15:42 Steven Walter 2007-08-08 16:10 ` Alex Riesen 0 siblings, 1 reply; 4+ messages in thread From: Steven Walter @ 2007-08-08 15:42 UTC (permalink / raw) To: git I'm importing a large repository from svn into git with a custom tool, and I noticed a strange issue with one of the commits. Upon investigating further, I found that when I ran "git-write-tree" followed immediately by "git-diff-index <tree>" I had differences. Does that mean that git-write-tree incorrectly recorded the index, or do I misunderstand things? I just wanted to verify that I have at least some clue what is going on before I dig too much deeper into this issue. I'm running git-1.5.3-rc4; I'll see if it occurs with 1.5.2 and bisect if not. -- -Steven Walter <stevenrwalter@gmail.com> "A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." -Robert Heinlein ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git-write-tree strangeness 2007-08-08 15:42 git-write-tree strangeness Steven Walter @ 2007-08-08 16:10 ` Alex Riesen 2007-08-08 19:39 ` Junio C Hamano 0 siblings, 1 reply; 4+ messages in thread From: Alex Riesen @ 2007-08-08 16:10 UTC (permalink / raw) To: Steven Walter; +Cc: git On 8/8/07, Steven Walter <stevenrwalter@gmail.com> wrote: > I'm importing a large repository from svn into git with a custom tool, > and I noticed a strange issue with one of the commits. > > Upon investigating further, I found that when I ran "git-write-tree" > followed immediately by "git-diff-index <tree>" I had differences. Does > that mean that git-write-tree incorrectly recorded the index, or do I > misunderstand things? What kind of differences? Different sha1 of content? I can't simply reproduce it. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git-write-tree strangeness 2007-08-08 16:10 ` Alex Riesen @ 2007-08-08 19:39 ` Junio C Hamano 2007-08-08 22:16 ` Steven Walter 0 siblings, 1 reply; 4+ messages in thread From: Junio C Hamano @ 2007-08-08 19:39 UTC (permalink / raw) To: Alex Riesen; +Cc: Steven Walter, git "Alex Riesen" <raa.lkml@gmail.com> writes: > On 8/8/07, Steven Walter <stevenrwalter@gmail.com> wrote: >> I'm importing a large repository from svn into git with a custom tool, >> and I noticed a strange issue with one of the commits. >> >> Upon investigating further, I found that when I ran "git-write-tree" >> followed immediately by "git-diff-index <tree>" I had differences. Does >> that mean that git-write-tree incorrectly recorded the index, or do I >> misunderstand things? > > What kind of differences? Different sha1 of content? > I can't simply reproduce it. Isn't this simply just a dirty worktree and missing --cached option? ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git-write-tree strangeness 2007-08-08 19:39 ` Junio C Hamano @ 2007-08-08 22:16 ` Steven Walter 0 siblings, 0 replies; 4+ messages in thread From: Steven Walter @ 2007-08-08 22:16 UTC (permalink / raw) To: Junio C Hamano; +Cc: Alex Riesen, git On Wed, Aug 08, 2007 at 12:39:03PM -0700, Junio C Hamano wrote: > "Alex Riesen" <raa.lkml@gmail.com> writes: > > > On 8/8/07, Steven Walter <stevenrwalter@gmail.com> wrote: > >> I'm importing a large repository from svn into git with a custom tool, > >> and I noticed a strange issue with one of the commits. > >> > >> Upon investigating further, I found that when I ran "git-write-tree" > >> followed immediately by "git-diff-index <tree>" I had differences. Does > >> that mean that git-write-tree incorrectly recorded the index, or do I > >> misunderstand things? > > > > What kind of differences? Different sha1 of content? > > I can't simply reproduce it. > > Isn't this simply just a dirty worktree and missing --cached > option? It doesn't happen everytime; I haven't found a set procedure to cause the problem. Your remark, Junio, combined with my later testing, lead me to believe that this is not a write-tree problem, but a git-add problem. The entire procedure I was following was: <change working copy by svn> git add . git add -u git write-tree git diff-index <tree> It seems to me that my expectation that diff-index show no changes was reasonable, but I misunderstood the implication; I expected diff-index to always compare the given tree to the index, regardless of the presence or absence of a '--cached' option. If I rebuilt git from v1.5.2 and repeated the above commands, diff-tree showed no differences, as I would expect. Further, if I then re-ran write-tree/diff-index from v1.5.3-rc4, I still received no differences. I believe this result exculpates write-tree. Was there not a thread recently about a missing optimization in git-add? If this change was included in v1.5.3-rc4, could it be the cause of my discrepency? Suggestions for testing this theory, if it is reasonable? -- -Steven Walter <stevenrwalter@gmail.com> "A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." -Robert Heinlein ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-08 22:16 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-08-08 15:42 git-write-tree strangeness Steven Walter 2007-08-08 16:10 ` Alex Riesen 2007-08-08 19:39 ` Junio C Hamano 2007-08-08 22:16 ` Steven Walter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).