{"thread":{"id":"21775","subject":"[PATCH v2 2/3] format-patch: make full-diff enabled by default","startedAt":"2009-11-28T11:40:26Z","lastAt":"2010-01-05T22:38:10Z","messageCount":6,"participants":["Felipe Contreras","Junio C Hamano","Nanako Shiraishi"],"isPatch":true,"patchVersion":2,"patchTotal":3},"messages":[{"id":"128626","messageId":"1259408429-5685-1-git-send-email-felipe.contreras@gmail.com","threadId":"21775","inReplyTo":null,"subject":"[PATCH v2 0/3] format-patch: improve pathspec usage","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-11-28T11:40:26Z","receivedAt":"2009-11-28T11:40:26Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Even though it's not documented, users still can make use of pathspecs in 'git\nformat-patch'. This patch series improves the way it works.\n\nFirst, parse_options must not eat the '--', then, full-diff is the only way\npathspecs make sense.\n\nThis is v2, after comments from Junio. Still pending are the improvements in\ndocumentation to explain how pathspecs make sense.\n\nFelipe Contreras (3):\n  format-patch: fix dashdash usage\n  format-patch: make full-diff enabled by default\n  format-patch: add test for dashdash\n\n builtin-log.c           |    4 +++-\n t/t4014-format-patch.sh |    4 ++++\n 2 files changed, 7 insertions(+), 1 deletions(-)\n"},{"id":"128625","messageId":"1259408429-5685-2-git-send-email-felipe.contreras@gmail.com","threadId":"21775","inReplyTo":"1259408429-5685-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 1/3] format-patch: fix dashdash usage","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-11-28T11:40:27Z","receivedAt":"2009-11-28T11:40:27Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"$ git format-patch <committish> -- <path-not-in-working-dir>\n\nDoesn't work otherwise. The current code would complain that the path is\nnot in the working tree and that \"--\" must be specified, even if the\nuser _did_ specify it. This happens because \"--\" is removed from the\narguments, so we need to pass PARSE_OPT_KEEP_DASHDASH to parse_options\nto avoid that.\n\nComments by Junio C Hamano.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n builtin-log.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 33fa6ea..1766349 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -976,7 +976,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t */\n \targc = parse_options(argc, argv, prefix, builtin_format_patch_options,\n \t\t\t     builtin_format_patch_usage,\n-\t\t\t     PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN);\n+\t\t\t     PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN |\n+\t\t\t     PARSE_OPT_KEEP_DASHDASH);\n \n \tif (do_signoff) {\n \t\tconst char *committer;\n-- \n1.6.6.rc0.59.g5117f7.dirty\n"},{"id":"128624","messageId":"1259408429-5685-3-git-send-email-felipe.contreras@gmail.com","threadId":"21775","inReplyTo":"1259408429-5685-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 2/3] format-patch: make full-diff enabled by default","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-11-28T11:40:28Z","receivedAt":"2009-11-28T11:40:28Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"It doesn't make much sense to generate partial patches (with some paths\nomitted).\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n builtin-log.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 1766349..1e06859 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -960,6 +960,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \trev.diff = 1;\n \trev.combine_merges = 0;\n \trev.ignore_merges = 1;\n+\trev.full_diff = 1;\n \tDIFF_OPT_SET(&rev.diffopt, RECURSIVE);\n \n \trev.subject_prefix = fmt_patch_subject_prefix;\n-- \n1.6.6.rc0.59.g5117f7.dirty\n"},{"id":"128627","messageId":"1259408429-5685-4-git-send-email-felipe.contreras@gmail.com","threadId":"21775","inReplyTo":"1259408429-5685-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH v2 3/3] format-patch: add test for dashdash","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-11-28T11:40:29Z","receivedAt":"2009-11-28T11:40:29Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n t/t4014-format-patch.sh |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex 7f267f9..d5b002d 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -536,6 +536,10 @@ test_expect_success 'format-patch --signoff' '\n \tgrep \"^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>\"\n '\n \n+test_expect_success 'format-patch -- <path>' '\n+\tgit format-patch master..side -- file\n+'\n+\n echo \"fatal: --name-only does not make sense\" > expect.name-only\n echo \"fatal: --name-status does not make sense\" > expect.name-status\n echo \"fatal: --check does not make sense\" > expect.check\n-- \n1.6.6.rc0.59.g5117f7.dirty\n"},{"id":"128639","messageId":"7vpr72fn3x.fsf@alter.siamese.dyndns.org","threadId":"21775","inReplyTo":"1259408429-5685-1-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH v2 0/3] format-patch: improve pathspec usage","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-28T19:47:14Z","receivedAt":"2009-11-28T19:47:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks; I think I have queued the equivalent already and pushed out last\nnight.\n\nI think making the full-diff default is a regression without an ability to\nturn it off and is a bit premature without a solid discussion in the\ndocumentation.\n"},{"id":"130868","messageId":"20100106073810.6117@nanako3.lavabit.com","threadId":"21775","inReplyTo":"1259408429-5685-3-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH v2 2/3] format-patch: make full-diff enabled by default","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2010-01-05T22:38:10Z","receivedAt":"2010-01-05T22:38:10Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Junio, could you tell us what happened to this thread?\n"}]}