{"thread":{"id":"106","subject":"SCSI trees, merges and git status","startedAt":"2005-04-18T20:28:38Z","lastAt":"2005-04-19T03:04:56Z","messageCount":13,"participants":["James Bottomley","Linus Torvalds","Junio C Hamano","Petr Baudis","David Woodhouse"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"685","messageId":"1113856118.4998.70.camel@mulgrave","threadId":"106","inReplyTo":null,"subject":"SCSI trees, merges and git status","fromName":"James Bottomley","fromEmail":"james.bottomley@steeleye.com","sentAt":"2005-04-18T20:28:38Z","receivedAt":"2005-04-18T20:28:38Z","isPatch":false,"sender":{"key":"james.bottomley@steeleye.com","avatar":null},"body":"As of today, I have two SCSI git trees operational:\n\nrsync://www.parisc-linux.org/~jejb/scsi-rc-fixes-2.6.git\n\nand\n\nrsync://www.parisc-linux.org/~jejb/scsi-misc-2.6.git\n\nThe latter has a non trivial merge in it because of a conflict in\nscsi_device.h, so merges actually do work ...\n\nThe trees are exported from BK a changeset at a time (except the merge\nbits, which were done manually).  I'll continue to accumulate patches in\nthe BK trees for the time being since we don't have a nice web browser\ninterface for the git trees (and also my commit scripts are all BK\nbased).\n\nLinus, the rc-fixes repo is ready for applying ... it's the same one I\nannounced on linux-scsi and lkml a while ago just with the git date\ninformation updated to be correct (the misc one should wait until after\n2.6.12 is final).\n\nJames\n\n\n"},{"id":"698","messageId":"Pine.LNX.4.58.0504181429570.15725@ppc970.osdl.org","threadId":"106","inReplyTo":"1113856118.4998.70.camel@mulgrave","subject":"Re: SCSI trees, merges and git status","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-04-18T21:39:09Z","receivedAt":"2005-04-18T21:39:09Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 18 Apr 2005, James Bottomley wrote:\n>\n> As of today, I have two SCSI git trees operational:\n> \n> rsync://www.parisc-linux.org/~jejb/scsi-rc-fixes-2.6.git\n\nMerged. Here's the command line history:\n\n\t~/git/git-pull-script rsync://www.parisc-linux.org/~jejb/scsi-rc-fixes-2.6.git\n\tmerge-cache ~/git/git-merge-one-file-script -a\n\twrite-tree \n\tcommit-tree 2c8de70faf92af971667a26a6a397052fc572add -p $(cat .git/HEAD) -p $(cat .git/MERGE_HEAD)\n\nie the \"git-pull-script\" failed due to the content merge (I didn't trust \nthe merge-cache stuff enough to put that into it), but then doing the \nautomated merge was successful without any editing, so I just wrote the \ntree and committed it.\n\nAgain, if anybody wants to reproduce this, you'll need to then do the\n\n\tcheckout-cache -f -a\n\tupdate-cace --refresh\n\nafterwards to make your working area match the merged tree.\n\n> Linus, the rc-fixes repo is ready for applying ... it's the same one I\n> announced on linux-scsi and lkml a while ago just with the git date\n> information updated to be correct (the misc one should wait until after\n> 2.6.12 is final).\n\nOk. Can you verify? I did a \"git diff\" between your old head and my new\nhead, and it did not show any SCSI files (only the expected arm etc stuff\nthat you didn't have in your), so it all _looks_ good. But hey, just to\nmake sure that I didn't do anything stupid..\n\n\t\tLinus\n"},{"id":"721","messageId":"1113866092.4998.92.camel@mulgrave","threadId":"106","inReplyTo":"Pine.LNX.4.58.0504181429570.15725@ppc970.osdl.org","subject":"Re: SCSI trees, merges and git status","fromName":"James Bottomley","fromEmail":"james.bottomley@steeleye.com","sentAt":"2005-04-18T23:14:51Z","receivedAt":"2005-04-18T23:14:51Z","isPatch":false,"sender":{"key":"james.bottomley@steeleye.com","avatar":null},"body":"On Mon, 2005-04-18 at 14:39 -0700, Linus Torvalds wrote:\n> > Linus, the rc-fixes repo is ready for applying ... it's the same one I\n> > announced on linux-scsi and lkml a while ago just with the git date\n> > information updated to be correct (the misc one should wait until after\n> > 2.6.12 is final).\n> \n> Ok. Can you verify? I did a \"git diff\" between your old head and my new\n> head, and it did not show any SCSI files (only the expected arm etc stuff\n> that you didn't have in your), so it all _looks_ good. But hey, just to\n> make sure that I didn't do anything stupid..\n\nActually, the verify fails, according to bitkeeper.\n\nIt looks like the merge tree has contamination from the scsi-misc-2.6\ntree ... possibly because the hosting system got the merged objects when\nI pushed.\n\nCould you strip it back and I'll check out the repos on www.parisc-\nlinux.org?\n\nThanks,\n\nJames\n\n\n"},{"id":"724","messageId":"7vmzrvsm8j.fsf@assigned-by-dhcp.cox.net","threadId":"106","inReplyTo":"Pine.LNX.4.58.0504181429570.15725@ppc970.osdl.org","subject":"Re: SCSI trees, merges and git status","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-18T23:23:24Z","receivedAt":"2005-04-18T23:23:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"LT\" == Linus Torvalds <torvalds@osdl.org> writes:\n\nLT> Merged. Here's the command line history:\n\nLT> \t~/git/git-pull-script \\\nLT>        rsync://www.parisc-linux.org/~jejb/scsi-rc-fixes-2.6.git\n\nMaybe it is just me, but I have this setup:\n\n    $ /bin/ls -lF .git\n    total 20\n    -rw-rw-r--  1 junio src     41 Apr 18 16:03 HEAD\n    -rw-rw-r--  1 junio junio   41 Apr 18 15:07 MERGE_HEAD\n    -rw-------  1 junio src   2720 Apr 18 16:03 index\n    lrwxrwxrwx  1 junio src     18 Apr 18 15:55 objects -> ../../.git/objects/\n\nMy point being that .git/objects is a symbolic link and shares\nobject database with somewhere else.\n\nHowever the \"Getting object database\" part trashed this symlink\nwhen I tried to pull from my other repo locally.  I am wondering\nit the following might be a better alternative.  A possible\ndownside in this approach is that you would not pull .git/heads\nand .git/tags (i.e. Pesky stuff) from the remote anymore.  Is it\na problem (I am also CC'ing Petr to hear his opinion on this).\n\nIf not, please apply.\n\n[PATCH] Do not let rsync obliterate .git/object symbolic link.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\ngit-pull-script: e27215d3978635558c63859495d97f8114b4ece3\n--- a/git-pull-script\n+++ b/git-pull-script\n@@ -6,7 +6,7 @@\n merge_repo=$1\n \n echo \"Getting object database\"\n-rsync -avz --ignore-existing $merge_repo/ .git/\n+rsync -avz --ignore-existing $merge_repo/objects/. .git/objects/.\n \n echo \"Getting remote head\"\n rsync -avz $merge_repo/HEAD .git/MERGE_HEAD\n\n"},{"id":"727","messageId":"20050418232803.GP5554@pasky.ji.cz","threadId":"106","inReplyTo":"7vmzrvsm8j.fsf@assigned-by-dhcp.cox.net","subject":"Re: SCSI trees, merges and git status","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-18T23:28:03Z","receivedAt":"2005-04-18T23:28:03Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Apr 19, 2005 at 01:23:24AM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> told me that...\n> However the \"Getting object database\" part trashed this symlink\n> when I tried to pull from my other repo locally.  I am wondering\n> it the following might be a better alternative.  A possible\n> downside in this approach is that you would not pull .git/heads\n> and .git/tags (i.e. Pesky stuff) from the remote anymore.  Is it\n> a problem (I am also CC'ing Petr to hear his opinion on this).\n\nGetting tags is probably nice. You should definitively not get\n.git/heads, though. Those are your private stuff mostly, and the HEAD\nyou \"export\" is .git/HEAD.\n\nI'm thinking about this yet, since it might be useful to be able to\nexport multiple branches without needing to set up multiple rsync\nURLs... you still don't want the heads/ directory en block, though.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"732","messageId":"Pine.LNX.4.58.0504181651241.15725@ppc970.osdl.org","threadId":"106","inReplyTo":"1113866092.4998.92.camel@mulgrave","subject":"Re: SCSI trees, merges and git status","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-04-19T00:03:44Z","receivedAt":"2005-04-19T00:03:44Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 18 Apr 2005, James Bottomley wrote:\n> \n> It looks like the merge tree has contamination from the scsi-misc-2.6\n> tree ... possibly because the hosting system got the merged objects when\n> I pushed.\n\nNope, the way I merge, if I get a few objects it shouldn't matter at all. \nI'll just look at your HEAD, and merge with the objects that represents.\n\nAfterwards, if I have extra objects, I'll see them with fsck-cache. \n\n> Could you strip it back and I'll check out the repos on www.parisc-\n> linux.org?\n\nGit does work like BK in the way that you cannot remove history when you\nhave distributed it. Once it's there, it's there.\n\nThe patches from you I have in my tree are:\n\n\tscsi: add DID_REQUEUE to the error handling\n\tzfcp: add point-2-point support\n\t[PATCH] Convert i2o to compat_ioctl\n\t[PATCH] kill old EH constants\n\t[PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field\n\t[PATCH] scsi: remove unused scsi_cmnd->internal_timeout field\n\t[PATCH] remove outdated print_* functions\n\t[PATCH] consolidate timeout defintions in scsi.h\n\nor at least that's what they claim in their changelogs.\n\nOh, and here's the diffstat that matches \"scsi\":\n\n drivers/block/scsi_ioctl.c                 |    5 -\n drivers/s390/scsi/zfcp_aux.c               |    4 -\n drivers/s390/scsi/zfcp_def.h               |    5 +\n drivers/s390/scsi/zfcp_erp.c               |   20 +++++\n drivers/s390/scsi/zfcp_fsf.c               |   38 ++++++++--\n drivers/s390/scsi/zfcp_fsf.h               |    6 +\n drivers/s390/scsi/zfcp_sysfs_adapter.c     |    6 +\n drivers/scsi/53c7xx.c                      |   23 +++---\n drivers/scsi/BusLogic.c                    |    7 -\n drivers/scsi/NCR5380.c                     |    9 +-\n drivers/scsi/advansys.c                    |    7 -\n drivers/scsi/aha152x.c                     |   17 ++--\n drivers/scsi/arm/acornscsi.c               |    9 +-\n drivers/scsi/arm/fas216.c                  |    9 +-\n drivers/scsi/arm/scsi.h                    |    2 \n drivers/scsi/atari_NCR5380.c               |    9 +-\n drivers/scsi/constants.c                   |    2 \n drivers/scsi/ips.c                         |    7 -\n drivers/scsi/ncr53c8xx.c                   |   14 ---\n drivers/scsi/pci2000.c                     |    4 -\n drivers/scsi/qla2xxx/qla_dbg.c             |    6 -\n drivers/scsi/scsi.c                        |    5 -\n drivers/scsi/scsi.h                        |   43 -----------\n drivers/scsi/scsi_error.c                  |   11 ---\n drivers/scsi/scsi_ioctl.c                  |    5 -\n drivers/scsi/scsi_lib.c                    |    2 \n drivers/scsi/scsi_obsolete.h               |  106 -----------------------------\n drivers/scsi/scsi_priv.h                   |    5 -\n drivers/scsi/seagate.c                     |    5 -\n drivers/scsi/sg.c                          |    3 \n drivers/scsi/sun3_NCR5380.c                |    9 +-\n drivers/scsi/sym53c8xx_2/sym_glue.c        |    6 -\n drivers/scsi/ultrastor.c                   |    4 -\n\nso it doesn't look like there's a _lot_ wrong. Send in a patch to revert \nanything that needs reverting..\n\n\t\tLinus\n"},{"id":"735","messageId":"1113869456.3579.12.camel@localhost.localdomain","threadId":"106","inReplyTo":"Pine.LNX.4.58.0504181651241.15725@ppc970.osdl.org","subject":"Re: SCSI trees, merges and git status","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-04-19T00:10:54Z","receivedAt":"2005-04-19T00:10:54Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Mon, 2005-04-18 at 17:03 -0700, Linus Torvalds wrote:\n> Git does work like BK in the way that you cannot remove history when you\n> have distributed it. Once it's there, it's there.\n\nBut older history can be pruned, and there's really no reason why an\nhttp-based 'git pull' couldn't simply refrain from fetching commits\nolder than a certain threshold.\n\nHowever, we can't _add_ the history if the current commits don't refer\nto it. I really think we should take the imported git history and make\nour 'current' tree refer to it -- even if just by having an appropriate\n'parent' record in what is currently the oldest changeset in our tree;\nthe 2.6.12-rc2 import.\n\nIt doesn't matter that our oldest commit object refers to a nonexistent\nparent, but that does allow us to import historical data if we _want_\nto, and have it all work properly.\n\nWe should have the full historical git repo available within a day or\nso, I believe. It would be really useful if we could make the current\ntrees refer back to that, instead of starting at 2.6.12-rc2.\n\n-- \ndwmw2\n\n"},{"id":"737","messageId":"1113869594.4998.103.camel@mulgrave","threadId":"106","inReplyTo":"Pine.LNX.4.58.0504181651241.15725@ppc970.osdl.org","subject":"Re: SCSI trees, merges and git status","fromName":"James Bottomley","fromEmail":"james.bottomley@steeleye.com","sentAt":"2005-04-19T00:13:14Z","receivedAt":"2005-04-19T00:13:14Z","isPatch":false,"sender":{"key":"james.bottomley@steeleye.com","avatar":null},"body":"On Mon, 2005-04-18 at 17:03 -0700, Linus Torvalds wrote:\n> The patches from you I have in my tree are:\n> \n> \tscsi: add DID_REQUEUE to the error handling\n> \tzfcp: add point-2-point support\n> \t[PATCH] Convert i2o to compat_ioctl\n> \t[PATCH] kill old EH constants\n> \t[PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field\n> \t[PATCH] scsi: remove unused scsi_cmnd->internal_timeout field\n> \t[PATCH] remove outdated print_* functions\n> \t[PATCH] consolidate timeout defintions in scsi.h\n\nThose are a subset of patches from my scsi-misc-2.6 tree .. that's the\nproblem.  The actual patches should be:\n\n  o zfcp: convert to compat_ioctl\n  o sg.c: update\n  o updates for CFQ oops fix\n  o finally fix 53c700 to use the generic iomem infrastructure\n  o fix NMI lockup with CFQ scheduler\n\nI've redone the scsi-rc-fixes-2.6 tree to remove all the contamination\nand reset the head correctly.\n\nI've verified that if I strip your tree back to \n\n54ff646c589dcc35182d01c5b557806759301aa3\n\nand then do a \n\ngit-pull-script rsync://www.parisc-linux.org/~jejb/scsi-rc-fixes-2.6.git\n\nThen the git-pull... script actually does the merge and the resulting\ntree checks out against BK\n\nSorry for the screw up.\n\nJames\n\n\n> or at least that's what they claim in their changelogs.\n> \n> Oh, and here's the diffstat that matches \"scsi\":\n> \n>  drivers/block/scsi_ioctl.c                 |    5 -\n>  drivers/s390/scsi/zfcp_aux.c               |    4 -\n>  drivers/s390/scsi/zfcp_def.h               |    5 +\n>  drivers/s390/scsi/zfcp_erp.c               |   20 +++++\n>  drivers/s390/scsi/zfcp_fsf.c               |   38 ++++++++--\n>  drivers/s390/scsi/zfcp_fsf.h               |    6 +\n>  drivers/s390/scsi/zfcp_sysfs_adapter.c     |    6 +\n>  drivers/scsi/53c7xx.c                      |   23 +++---\n>  drivers/scsi/BusLogic.c                    |    7 -\n>  drivers/scsi/NCR5380.c                     |    9 +-\n>  drivers/scsi/advansys.c                    |    7 -\n>  drivers/scsi/aha152x.c                     |   17 ++--\n>  drivers/scsi/arm/acornscsi.c               |    9 +-\n>  drivers/scsi/arm/fas216.c                  |    9 +-\n>  drivers/scsi/arm/scsi.h                    |    2 \n>  drivers/scsi/atari_NCR5380.c               |    9 +-\n>  drivers/scsi/constants.c                   |    2 \n>  drivers/scsi/ips.c                         |    7 -\n>  drivers/scsi/ncr53c8xx.c                   |   14 ---\n>  drivers/scsi/pci2000.c                     |    4 -\n>  drivers/scsi/qla2xxx/qla_dbg.c             |    6 -\n>  drivers/scsi/scsi.c                        |    5 -\n>  drivers/scsi/scsi.h                        |   43 -----------\n>  drivers/scsi/scsi_error.c                  |   11 ---\n>  drivers/scsi/scsi_ioctl.c                  |    5 -\n>  drivers/scsi/scsi_lib.c                    |    2 \n>  drivers/scsi/scsi_obsolete.h               |  106 -----------------------------\n>  drivers/scsi/scsi_priv.h                   |    5 -\n>  drivers/scsi/seagate.c                     |    5 -\n>  drivers/scsi/sg.c                          |    3 \n>  drivers/scsi/sun3_NCR5380.c                |    9 +-\n>  drivers/scsi/sym53c8xx_2/sym_glue.c        |    6 -\n>  drivers/scsi/ultrastor.c                   |    4 -\n> \n> so it doesn't look like there's a _lot_ wrong. Send in a patch to revert \n> anything that needs reverting..\n> \n> \t\tLinus\n> -\n> To unsubscribe from this list: send the line \"unsubscribe linux-scsi\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n"},{"id":"738","messageId":"1113869817.4998.106.camel@mulgrave","threadId":"106","inReplyTo":"1113869456.3579.12.camel@localhost.localdomain","subject":"Re: SCSI trees, merges and git status","fromName":"James Bottomley","fromEmail":"james.bottomley@steeleye.com","sentAt":"2005-04-19T00:16:57Z","receivedAt":"2005-04-19T00:16:57Z","isPatch":false,"sender":{"key":"james.bottomley@steeleye.com","avatar":null},"body":"On Tue, 2005-04-19 at 10:10 +1000, David Woodhouse wrote:\n> On Mon, 2005-04-18 at 17:03 -0700, Linus Torvalds wrote:\n> > Git does work like BK in the way that you cannot remove history when you\n> > have distributed it. Once it's there, it's there.\n> \n> But older history can be pruned, and there's really no reason why an\n> http-based 'git pull' couldn't simply refrain from fetching commits\n> older than a certain threshold.\n\nYes, that's what I did to get back to the commit just before the merge:\n\nfsck-cache --unreachable 54ff646c589dcc35182d01c5b557806759301aa3|awk\n'/^unreachable /{print $2}'|sed 's:^\\(..\\):.git/objects/\\1/:'|xargs rm\n\nremoves all the objects from the tree prior to the bogus commit---it's\nbased on your (Linus') git-prune-script.\n\nJames\n\n\n"},{"id":"739","messageId":"Pine.LNX.4.58.0504181724170.15725@ppc970.osdl.org","threadId":"106","inReplyTo":"1113869594.4998.103.camel@mulgrave","subject":"Re: SCSI trees, merges and git status","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-04-19T00:29:24Z","receivedAt":"2005-04-19T00:29:24Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 18 Apr 2005, James Bottomley wrote:\n> \n> Then the git-pull... script actually does the merge and the resulting\n> tree checks out against BK\n\nSo?\n\nWhat do you intend to do with all the other stuff I've already put on top?\n\nYes, I can undo my tree, but my tree has had more stuff in it since I \npulled from you, so not only will that confuse everybody who already got \nthe up-to-date tree, it will also undo stuff that was correct.\n\nIn other words, HISTORY CANNOT BE UNDONE.\n\nThat's the rule, and it's a damn good one. It was the rule when we used\nBK, and it's the rule now. The fact that you can undo your history in\n_your_ tree doesn't change anything at all.\n\nSo I can merge with your new tree, but that won't actually help any: I'll \njust get a superset, the way you did things. \n\nThe way to remove patches is to explicitly revert them (effectively\napplying a reverse diff), but I'm wondering if it's worth it in this case. \nI looked at the patches I did get, and they didn't look horribly bad per \nse. Are they dangerous?\n\n2.6.12 is some time away, if for no other reason than the fact that this \nSCM thing has obviously eaten two weeks of my time. So I'd be inclined to \nchalk this up as a \"learning experience\" with git, and just go forward.\n\n\t\tLinus\n"},{"id":"741","messageId":"1113871307.3579.21.camel@localhost.localdomain","threadId":"106","inReplyTo":"1113869817.4998.106.camel@mulgrave","subject":"Re: SCSI trees, merges and git status","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-04-19T00:41:46Z","receivedAt":"2005-04-19T00:41:46Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Mon, 2005-04-18 at 19:16 -0500, James Bottomley wrote:\n> Yes, that's what I did to get back to the commit just before the\n> merge:\n> \n> fsck-cache --unreachable 54ff646c589dcc35182d01c5b557806759301aa3|awk\n> '/^unreachable /{print $2}'|sed 's:^\\(..\\):.git/objects/\\1/:'|xargs rm\n\nI was actually digressing and talking about pruning ancient history\nwhich _is_ theoretically reachable. It's not being 'undone'; it's just\nbeing omitted from the current _working_ tree. The whole point is that\nin a fully-populated tree the history _should_ be accessible all the way\nback.\n\nWe're trying to get the older history available on kernel.org ASAP. The\nblobs are rsyncing to ~dwmw2/git/kernel-tglx1; the trees and commit\nobjects will be coming soon. \n\nTheoretically all Linus actually needs in order to rebuild his current\ntree is the sha1 hash of the final commit in that historical tree, which\ncorresponds to 2.6.12-rc2.\n\n-- \ndwmw2\n\n"},{"id":"770","messageId":"1113877071.4998.111.camel@mulgrave","threadId":"106","inReplyTo":"Pine.LNX.4.58.0504181724170.15725@ppc970.osdl.org","subject":"Re: SCSI trees, merges and git status","fromName":"James Bottomley","fromEmail":"james.bottomley@steeleye.com","sentAt":"2005-04-19T02:17:51Z","receivedAt":"2005-04-19T02:17:51Z","isPatch":false,"sender":{"key":"james.bottomley@steeleye.com","avatar":null},"body":"On Mon, 2005-04-18 at 17:29 -0700, Linus Torvalds wrote:\n> 2.6.12 is some time away, if for no other reason than the fact that this \n> SCM thing has obviously eaten two weeks of my time. So I'd be inclined to \n> chalk this up as a \"learning experience\" with git, and just go forward.\n\nFair enough.  If you pull from\n\nrsync://www.parisc-linux.org/~jejb/scsi-misc-2.6.git\n\nThat will pull in the rest of my scsi-misc-2.6 tree (which includes all\nof the rc fixes).  I've done a test pull and merge and checked the\nresulting against BK, so hopefully there should be no more screw ups.\n\nDoing this exposed two bugs in your merge script:\n\n1) It doesn't like a completely new directory (the misc tree contains a\nnew drivers/scsi/lpfc)\n2) the merge testing logic is wrong.  You only want to exit 1 if the\nmerge fails.\n\nJames\n\ngit-merge-one-file-script: bec009e2c37bacc9e6f9cad1cfa5fd56752c7bf1\n--- a/git-merge-one-file-script\n+++ b/git-merge-one-file-script\n@@ -13,6 +13,11 @@\n # do any merges that migth change the tree layout\n #\n \n+# if the directory is newly added in a branch, it might not exist\n+# in the current tree\n+dir=$(dirname \"$4\")\n+mkdir -p \"$dir\"\n+\n case \"${1:-.}${2:-.}${3:-.}\" in\n #\n # deleted in both, or deleted in one and unchanged in the other\n@@ -40,7 +45,11 @@ case \"${1:-.}${2:-.}${3:-.}\" in\n \torig=$(unpack-file $1)\n \tsrc1=$(unpack-file $2)\n \tsrc2=$(unpack-file $3)\n-\tmerge \"$src2\" \"$orig\" \"$src1\" || echo Leaving conflict merge in $src2 && exit 1\n+\tmerge \"$src2\" \"$orig\" \"$src1\"\n+\tif [ $? -ne 0 ]; then\n+\t\techo Leaving conflict merge in $src2\n+\t\texit 1\n+\tfi\n \tcp \"$src2\" \"$4\" && update-cache --add -- \"$4\" && exit 0\n \t;;\n \n\n\n"},{"id":"777","messageId":"Pine.LNX.4.58.0504182003480.15725@ppc970.osdl.org","threadId":"106","inReplyTo":"1113877071.4998.111.camel@mulgrave","subject":"Re: SCSI trees, merges and git status","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-04-19T03:04:56Z","receivedAt":"2005-04-19T03:04:56Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 18 Apr 2005, James Bottomley wrote:\n> \n> Fair enough.  If you pull from\n> \n> rsync://www.parisc-linux.org/~jejb/scsi-misc-2.6.git\n\nThanks. Pulled and pushed out.\n\n> Doing this exposed two bugs in your merge script:\n> \n> 1) It doesn't like a completely new directory (the misc tree contains a\n> new drivers/scsi/lpfc)\n> 2) the merge testing logic is wrong.  You only want to exit 1 if the\n> merge fails.\n\nApplied.\n\n\t\tLinus\n"}]}