{"push_id":705168275,"size":27,"distinct_size":27,"ref":"refs/heads/pt/builtin-am","head":"35a0236576e4568fc3c3f88a076b877274a13a96","before":"4728cd562320205aad69b537c761cc758fea0526","commits":[{"sha":"96ba15fccc39051499025059e24ef4b9f9515390","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: implement patch queue mechanism\n\ngit-am applies a series of patches. If the process terminates\nabnormally, we want to be able to resume applying the series of patches.\nThis requires the session state to be saved in a persistent location.\n\nImplement the mechanism of a \"patch queue\", represented by 2 integers --\nthe index of the current patch we are applying and the index of the last\npatch, as well as its lifecycle through the following functions:\n\n* am_setup(), which will set up the state directory\n  $GIT_DIR/rebase-apply. As such, even if the process exits abnormally,\n  the last-known state will still persist.\n\n* am_load(), which is called if there is an am session in\n  progress, to load the last known state from the state directory so we\n  can resume applying patches.\n\n* am_run(), which will do the actual patch application. After applying a\n  patch, it calls am_next() to increment the current patch index. The\n  logic for applying and committing a patch is not implemented yet.\n\n* am_destroy(), which is finally called when we successfully applied all\n  the patches in the queue, to clean up by removing the state directory\n  and its contents.\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nHelped-by: Stefan Beller <sbeller@google.com>\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/96ba15fccc39051499025059e24ef4b9f9515390"},{"sha":"80d7b374456c47868a8b413e254db8a315bf1e65","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: split out mbox/maildir patches with git-mailsplit\n\ngit-am.sh supports mbox, stgit and mercurial patches. Re-implement\nsupport for splitting out mbox/maildirs using git-mailsplit, while also\nimplementing the framework required to support other patch formats in\nthe future.\n\nRe-implement support for the --patch-format option (since a5a6755\n(git-am foreign patch support: introduce patch_format, 2009-05-27)) to\nallow the user to choose between the different patch formats.\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/80d7b374456c47868a8b413e254db8a315bf1e65"},{"sha":"03ec84e5ddb581cad8ef20aab55c88e3296d958c","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"builtin/am: detect mbox patches\n\nSince 15ced75 (git-am foreign patch support: autodetect some patch\nformats, 2009-05-27), git-am.sh is able to autodetect mbox, stgit and\nmercurial patches through heuristics.\n\nRe-implement support for autodetecting mbox/maildir files in\nbuiltin/am.c.\n\nRFC 2822 requires that lines are terminated by \"\\r\\n\". To support this,\nimplement strbuf_getline_crlf(), which will remove both '\\n' and \"\\r\\n\"\nfrom the end of the line.\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nHelped-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/03ec84e5ddb581cad8ef20aab55c88e3296d958c"},{"sha":"c0ddef4e8ef07b0576f6d2b9a3fb1cc4459152f1","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: extract patch, message and authorship with git-mailinfo\n\nFor the purpose of applying the patch and committing the results,\nimplement extracting the patch data, commit message and authorship from\nan e-mail message using git-mailinfo.\n\ngit-mailinfo is run as a separate process, but ideally in the future,\nwe should be be able to access its functionality directly without\nspawning a new process.\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nHelped-by: Jeff King <peff@peff.net>\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/c0ddef4e8ef07b0576f6d2b9a3fb1cc4459152f1"},{"sha":"ef0d6b7c6d32f307fe3240042fae0a86a33602cc","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: apply patch with git-apply\n\nImplement applying the patch to the index using git-apply.\n\nIf a file is unchanged but stat-dirty, git-apply may erroneously fail to\napply patches, thinking that they conflict with a dirty working tree.\n\nAs such, since 2a6f08a (am: refresh the index at start and --resolved,\n2011-08-15), git-am will refresh the index before applying patches.\nRe-implement this behavior.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/ef0d6b7c6d32f307fe3240042fae0a86a33602cc"},{"sha":"ed114350d29239e7f9be6091966074b3c6ebaa2e","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"builtin/am: implement committing applied patch\n\nImplement do_commit(), which commits the index which contains the\nresults of applying the patch, along with the extracted commit message\nand authorship information.\n\nSince 29b6754 (am: remove rebase-apply directory before gc, 2010-02-22),\ngit gc --auto is also invoked to pack the loose objects that are created\nfrom making the commits.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/ed114350d29239e7f9be6091966074b3c6ebaa2e"},{"sha":"71becdbe48e1460f66b5f928107b2c7521840554","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"builtin/am: refuse to apply patches if index is dirty\n\nSince d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am\nwill refuse to apply patches if the index is dirty. Re-implement this\nbehavior.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/71becdbe48e1460f66b5f928107b2c7521840554"},{"sha":"51f5c73bdbe0b24139a8a59c27aa928c2f69afde","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: implement --resolved/--continue\n\nSince 0c15cc9 (git-am: --resolved., 2005-11-16), git-am supported\nresuming from a failed patch application. The user will manually apply\nthe patch, and the run git am --resolved which will then commit the\nresulting index. Re-implement this feature by introducing am_resolve().\n\nSince it makes no sense for the user to run am --resolved when there is\nno session in progress, we error out in this case.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/51f5c73bdbe0b24139a8a59c27aa928c2f69afde"},{"sha":"91cc065af70da977d0402b3dbc5e0543d0c5e47f","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: implement --skip\n\nSince d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am\nsupported resuming from a failed patch application by skipping the\ncurrent patch. Re-implement this feature by introducing am_skip().\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/91cc065af70da977d0402b3dbc5e0543d0c5e47f"},{"sha":"63c71b1773effa3082ad281591b16b216251dcc1","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: implement --abort\n\nSince 3e5057a (git am --abort, 2008-07-16), git-am supported the --abort\noption that will rewind HEAD back to the original commit. Re-implement\nthis feature through am_abort().\n\nSince 7b3b7e3 (am --abort: keep unrelated commits since the last failure\nand warn, 2010-12-21), to prevent commits made since the last failure\nfrom being lost, git-am will not rewind HEAD back to the original\ncommit if HEAD moved since the last failure. Re-implement this through\nsafe_to_abort().\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/63c71b1773effa3082ad281591b16b216251dcc1"},{"sha":"74e3d0043446e18c94324f1eb3444d00411657c1","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: don't accept patches when there's a session in progress\n\nSince d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am\nwould error out if the user gave it mbox(s) on the command-line, but\nthere was a session in progress.\n\nSince c95b138 (Fix git-am safety checks, 2006-09-15), git-am would\ndetect if the user attempted to feed it a mbox via stdin, by checking if\nstdin is not a tty and there is no resume command given.\n\nRe-implement the above two safety checks.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/74e3d0043446e18c94324f1eb3444d00411657c1"},{"sha":"eb0505c8f4d9572fe612857f2224a62ae4fd71df","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: implement quiet option\n\nSince 0e987a1 (am, rebase: teach quiet option, 2009-06-16), git-am\nsupported the --quiet option and GIT_QUIET environment variable, and\nwhen told to be quiet, would only speak on failure. Re-implement this by\nintroducing the say() function, which works like fprintf_ln(), but would\nonly write to the stream when state->quiet is false.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/eb0505c8f4d9572fe612857f2224a62ae4fd71df"},{"sha":"b7e441ecf7d02b22a01d4f4a8e8a9076c1732e82","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: exit with user friendly message on patch failure\n\nSince ced9456 (Give the user a hint for how to continue in the case that\ngit-am fails because it requires user intervention, 2006-05-02), git-am\nprints additional information on how the user can re-invoke git-am to\nresume patch application after resolving the failure. Re-implement this\nthrough the die_user_resolve() function.\n\nSince cc12005 (Make git rebase interactive help match documentation.,\n2006-05-13), git-am supports the --resolvemsg option which is used by\ngit-rebase to override the message printed out when git-am fails.\nRe-implement this option.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/b7e441ecf7d02b22a01d4f4a8e8a9076c1732e82"},{"sha":"b8f2a64f94e9bbd01004e6a963d0a97adc8b3a5f","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: implement am --signoff\n\nSince d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am\nsupported the --signoff option which will append a signoff at the end of\nthe commit messsage. Re-implement this feature by calling\nappend_signoff() if the option is set.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/b8f2a64f94e9bbd01004e6a963d0a97adc8b3a5f"},{"sha":"08373b2043bac4643ab4c92965c71d12a5d2a155","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"cache-tree: introduce write_index_as_tree()\n\nA caller may wish to write a temporary index as a tree. However,\nwrite_cache_as_tree() assumes that the index was read from, and will\nwrite to, the default index file path. Introduce write_index_as_tree()\nwhich removes this limitation by allowing the caller to specify its own\nindex_state and index file path.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/08373b2043bac4643ab4c92965c71d12a5d2a155"},{"sha":"b24adc4e265947cb22b1634c6521119e530ad5cc","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: implement 3-way merge\n\nSince d1c5f2a (Add git-am, applymbox replacement., 2005-10-07),\ngit-am.sh supported the --3way option, and if set, would attempt to do a\n3-way merge if the initial patch application fails.\n\nSince 5d86861 (am -3: list the paths that needed 3-way fallback,\n2012-03-28), in a 3-way merge git-am.sh would list the paths that needed\n3-way fallback, so that the user can review them more carefully to spot\nmismerges.\n\nRe-implement the above in builtin/am.c.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/b24adc4e265947cb22b1634c6521119e530ad5cc"},{"sha":"9813b97eb93bf1ae18fe002b659dae50fac21621","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: --rebasing\n\nSince 3041c32 (am: --rebasing, 2008-03-04), git-am.sh supported the\n--rebasing option, which is used internally by git-rebase to tell git-am\nthat it is being used for its purpose. It would create the empty file\n$state_dir/rebasing to help \"completion\" scripts tell if the ongoing\noperation is am or rebase.\n\nAs of 0fbb95d (am: don't call mailinfo if $rebasing, 2012-06-26),\n--rebasing also implies --3way as well.\n\nSince a1549e1 (am: return control to caller, for housekeeping,\n2013-05-12), git-am.sh would only clean up the state directory when it\nis not --rebasing, instead deferring cleanup to git-rebase.sh.\n\nRe-implement the above in builtin/am.c.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/9813b97eb93bf1ae18fe002b659dae50fac21621"},{"sha":"846554cbfaeef3e3d3265a9414fa81f553f79000","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: don't use git-mailinfo if --rebasing\n\nSince 5e835ca (rebase: do not munge commit log message, 2008-04-16),\ngit am --rebasing no longer gets the commit log message from the patch,\nbut reads it directly from the commit identified by the \"From \" header\nline.\n\nSince 43c2325 (am: use get_author_ident_from_commit instead of mailinfo\nwhen rebasing, 2010-06-16), git am --rebasing also gets the author name,\nemail and date directly from the commit.\n\nSince 0fbb95d (am: don't call mailinfo if $rebasing, 2012-06-26), git am\n--rebasing does not use git-mailinfo to get the patch body, but rather\ngenerates it directly from the commit itself.\n\nThe above 3 commits introduced a separate parse_patch() code path in\ngit-am.sh's --rebasing mode that bypasses git-mailinfo. Re-implement\nthis code path in builtin/am.c as parse_patch_rebase().\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/846554cbfaeef3e3d3265a9414fa81f553f79000"},{"sha":"1620626630c6f79ae30fd957dc000e4e70b6cf50","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: handle stray state directory\n\nShould git-am terminate unexpectedly between the point where the state\ndirectory is created, but the \"next\" and \"last\" files are not written\nyet, a stray state directory will be left behind.\n\nAs such, since b141f3c (am: handle stray $dotest directory, 2013-06-15),\ngit-am.sh explicitly recognizes such a stray directory, and allows the\nuser to remove it with am --abort.\n\nRe-implement this feature in builtin/am.c.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/1620626630c6f79ae30fd957dc000e4e70b6cf50"},{"sha":"fd7de31cb76e14d50421d79e220e50602f5d6f19","author":{"email":"ca5433e1cdd25b4a4001c54525dea593b33edc0c@gmail.com","name":"Paul Tan"},"message":"am: implement -k/--keep, --keep-non-patch\n\nSince d1c5f2a (Add git-am, applymbox replacement., 2005-10-07),\ngit-am.sh supported the -k/--keep option to pass the -k option to\ngit-mailsplit.\n\nSince f7e5ea1 (am: learn passing -b to mailinfo, 2012-01-16), git-am.sh\nsupported the --keep-non-patch option to pass the -b option to\ngit-mailsplit.\n\nRe-implement these two options in builtin/am.c.\n\nSigned-off-by: Paul Tan <pyokagan@gmail.com>","distinct":true,"url":"https://api.github.com/repos/pyokagan/git/commits/fd7de31cb76e14d50421d79e220e50602f5d6f19"}]}