{"thread":{"id":"5495","subject":"pack-objects and rev-list status updates","startedAt":"2006-09-06T09:38:16Z","lastAt":"2006-09-06T09:38:16Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"26395","messageId":"7vveo172t3.fsf@assigned-by-dhcp.cox.net","threadId":"5495","inReplyTo":null,"subject":"pack-objects and rev-list status updates","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-06T09:38:16Z","receivedAt":"2006-09-06T09:38:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tonight's \"master\" has an update to teach git-rev-list to read\nlist of rev arguments from its standard input.  We owe Andy\nWhitcroft a big credit for starting this topic.\n\nThis required splitting out part of setup_revision() and make it\ncallable from the side.  Thanks to this split, it got a lot easier\nto teach pack-objects to do a similar trick.  I did a few:\n\n - Earlier patch I sent to give command line parameters similar\n   to rev-list to pack-objects was reworked on.  I chose to feed\n   rev arguments from its standard input; so\n\n\techo master..next | pack-objects --revs --stdout\n\n   would do what you would expect.\n\n - A patch before that one to add --unpacked=<existing pack>\n   option was resurrected and further reworked on.  Now you can\n   say,\n\n\trev-list --objects --unpacked=$active --all |\n        pack-objects $new\n\n   and/or\n\n\tpack-objects --unpacked=$active --all $new </dev/null\n\n   The </dev/null at the end is ugly but the command always\n   reads from its standard input.  Unlike the \"something like\n   this?\" patch, this version can take more than one such\n   \"pretend things in these packs are unpacked\" arguments.\n\n - I also told pack-objects to understand --thin, so you can do\n   a thin pack this:\n\n\techo master..next | pack-objects --thin --stdout\n\n   The equivalent expressed in the old way is:\n\n\trev-list --objects-edge master..next |\n        pack-objects --stdout\n\n   Note that --thin is only usable with --stdout, as before.\n\nAndy has a patch to use \"rev-list --stdin\" to lift the exec\narguments limit from send-pack; I tweaked it slightly and tested\nit minimally.  I think the logical next step would be to use\n\"pack-objects --stdin\" there and lose another pipe and a process.\n\nWe also should be able to do the same for upload-pack.  Now the\ngroundwork is more or less done, I think this is a good exercise\nfor a wannabe git hacker.  Hint hint...\n\nI do not expect to be working on git tomorrow (Wednesday my\ntime), so I will not be merging any of the above (except the\n\"rev-list --stdin\" change) in \"next\" tonight (eh, it is already\nWednesday wee morning), but they will appear in \"pu\".\n"}]}