Hi, On Mon, Nov 7, 2011 at 3:59 PM, Tony Wang <wwwjfy@xxxxxxxxx> wrote: > Hi, > I don't know if a better way to report this, so I write to the author of the > commit. Please let me know if I do wrong. :) It's good that you bisect to the broken commit and send me. However you should always send to git@vger just in case I'm unavailable. > The thing is the commit baf18fc261ca475343fe3cb9cd2c0dded4bc1bb7 made an > option broken sometimes (it's weird, but it's true that it didn't happen > every time) > I set "branch.master.mergeoptions=--squash" in config, but when I do "git > merge b", the squash didn't work, however, "git merge b --squash" works as > expected. What was the expection? --squash was not effective or something else? > I tried to debug, and found after this > merge.c:1104 > head_commit = lookup_commit_or_die(head_sha1, "HEAD"); > the variable branch becomes "s/origin/b", which is previously "b". > I used git bisect and found the > commit baf18fc261ca475343fe3cb9cd2c0dded4bc1bb7 caused this. Variable "head_sha1"? Strange because lookup_commit_or_die() takes "const char *" and the compiler should catch any attempts to change the variable. If you can reproduce it, can you make a small test case to demonstrate it? I'm not sure what "b" is and how you set up configuration for branch master. BTW what git version did you use? > I browsed the diff, and found the function lookup_commit_or_die > uses lookup_commit_reference, but not lookup_commit which was used > before lookup_commit_or_die replaced it. > Was it on purpose or typo? It was on purpose. HEAD may contain a tag, in which case lookup_commit() would to return a commit fail while lookup_commit_reference() can peel the tag to the commit. > If possible, it'll be good that I can know some details. > Thanks! -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html