* Re: for newbs = little exercise / tutorial / warmup for windows and other non-sophisticated new Git users :-)
From: Zorba @ 2008-12-28 1:29 UTC (permalink / raw)
To: git
In-Reply-To: <gj68a0$u56$3@ger.gmane.org>
tidied up the formatting, added a few more comments where needed, fixed
errors/lack of clarity
"Zorba" <cr@altmore.co.uk> wrote in message
news:gj68a0$u56$3@ger.gmane.org...
> Here is a little exercise / tutorial / warm-up for someone starting out
> with Git. If you're anyting like me you may find the tutorials etc. on
> git.or.cz a bit daunting. I recommend you try this after reading the user
> manual but before tearing your hair out trying to follow all the examples
> in the user manual. After you've followed this simple workflow, then go
> back to the more advanced stuff in the tutorials and user manuals (like
> cloning repositories and creating and merging branches).
>
> I created this exercise to try and model our workflow and what we wanted
> to use git for = tracking a project with multiple files where the filebase
> might change frequently from one version to the next.
>
> http://siliconmouth.wordpress.com/category/nerdy/
>
> look for December 27, 2008 or "git warmup"
>
>
^ permalink raw reply
* [Notice] The tip of 'next' will be rewound shortly
From: Junio C Hamano @ 2008-12-28 0:30 UTC (permalink / raw)
To: git
As has become customery recently, the 'next' branch will be rewound to
base on the last released 'master', since the v1.6.1 release was cut.
Also, earlier parts of nd/narrow topic has been dropped from 'next' and
the topic has been kicked back to 'pu'. I haven't started looking at
moving any topics out of 'pu' to 'next' yet, so there is nothing new on
'next', other than the things that came from 'master' and 'maint'.
^ permalink raw reply
* Re: Git (svn) merge - but ignore certain commits?
From: Peter Harris @ 2008-12-28 0:17 UTC (permalink / raw)
To: Peter Valdemar Mørch (Lists); +Cc: git
In-Reply-To: <49562749.9060705@sneakemail.com>
On Sat, Dec 27, 2008 at 8:02 AM, "Peter Valdemar Mørch (Lists)" wrote:
>
> * And now the trick: "git merge" "gitnewbranch" back to master. But I want
> to avoid the "git revert" of the few commits that weren't ready yet.
>
> * "git svn dcommit" master to get the new functionality into svn trunk.
>
> How do I "git merge" all of "gitnewbranch" except the reverts?
"git rebase -i trunk" after you "git merge". Delete the lines that
contain the will-be-reverted commits and the revert commits. Actually,
skip the reverts in the first place to save time.
Normally I wouldn't suggest it, since it will throw away your merge,
but "git svn dcommit" does an implicit rebase anyway, so you will lose
nothing.
> Is there a way to "git merge gitnewbranch" excluding the reverts, just the
> "new functionality", so the log of master doesn't even mention the reverts
> and so "git svn rebase" and "git svn dcommit" work properly?
If your branch is so ugly that you want to toss many of the commits
anyway, maybe "git merge --squash" is what you are looking for? Or
maybe you want to "git rebase -i" before merging?
> How do I do this "properly"?
Use many short-lived feature branches, not few long-lived generic
"development" branches. Merge-and-delete is easier than herding
reverts.
Peter Harris
^ permalink raw reply
* Re: [PATCH 3/3] pretty: support multiline subjects with format:
From: Junio C Hamano @ 2008-12-28 0:13 UTC (permalink / raw)
To: markus.heidelberg; +Cc: René Scharfe, git
In-Reply-To: <200812280024.59096.markus.heidelberg@web.de>
Markus Heidelberg <markus.heidelberg@web.de> writes:
> What's wrong with using the first line instead of the first paragraph
> for the other pretty options and for cases where only a small subject
> line is desired? A sentence would be broken into a small uncomplete part
> for the subject for example. What else?
The "first line" actually was what we used to do originally.
git-native commits did not have problem with this behaviour, but it caused
countless complaints from people looking at the history converted from
other cultures.
The behaviour was later fixed to avoid information loss when a commit from
a different culture begins the log with a long sentence, choped at
mid-sentence, to continue to the second line.
Please check the list archive for the details (sorry, I am bit too lazy to
repeat the argument myself).
^ permalink raw reply
* Re: [PATCH 3/3] pretty: support multiline subjects with format:
From: René Scharfe @ 2008-12-28 0:12 UTC (permalink / raw)
To: markus.heidelberg; +Cc: git
In-Reply-To: <200812280024.59096.markus.heidelberg@web.de>
Markus Heidelberg schrieb:
>> git log --pretty=format:%s (and tformat:) used to display the first
>> line of the subject, unlike the other --pretty options, which would
>> construct a subject line from all lines of the first paragraph of
>> the commit message.
>
> And that can be very annoying when working on repositories with a
> history not formatted after the recommendations of git (empty line after
> the summary). Then the output of commands like
> "git log --pretty=oneline", "git format-patch" and "git show-branch"
> is unreadable.
>
> Sorry, I haven't tested your patch set, what is the output of
> git-shortlog like now?
It's unchanged since it has it's own commit message parser.
>> For consistency and increased code reuse, change format: to do the
>> same as the other options.
>
> What's wrong with using the first line instead of the first paragraph
> for the other pretty options and for cases where only a small subject
> line is desired? A sentence would be broken into a small uncomplete part
> for the subject for example. What else?
I'm inching towards the goal of being able to replicate all of the other
--pretty flavours with format: (or tformat:) strings.
--pretty=oneline used to print only the first line, but was changed to
the way it's now in 4234a761 more than a year ago. In my mind,
"subject" is defined by "what oneline is printing", so I think changing
the format: placeholder %s to show the whole first paragraph is a bug fix.
If you actually like the old behaviour then perhaps a new placeholder
(%S ?) should be introduced instead?
René
^ permalink raw reply
* Re: [PATCH 3/3] pretty: support multiline subjects with format:
From: Nanako Shiraishi @ 2008-12-28 0:09 UTC (permalink / raw)
To: markus.heidelberg; +Cc: René Scharfe, git
In-Reply-To: <200812280024.59096.markus.heidelberg@web.de>
Quoting Markus Heidelberg <markus.heidelberg@web.de>:
>> For consistency and increased code reuse, change format: to do the
>> same as the other options.
>
> What's wrong with using the first line instead of the first paragraph
> for the other pretty options and for cases where only a small subject
> line is desired?
There were too many issues. The mail archive tells us that there were considerable discussions and thoughts behind the current behavior:
http://thread.gmane.org/gmane.comp.version-control.git/49694/focus=49922
http://thread.gmane.org/gmane.comp.version-control.git/46341/focus=46818
http://thread.gmane.org/gmane.comp.version-control.git/54020/focus=54132
http://thread.gmane.org/gmane.comp.version-control.git/21949/focus=21987
The last message mentions a bug in "git rebase" that internally uses "git am" when replaying the changes. It was corrected later with:
http://thread.gmane.org/gmane.linux.ports.sh.devel/3833/focus=79735
Reading the discussion in the messages in this thread will help understanding the issues, after understanding why "the first line" was problematic, as discussed in the other threads.
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
^ permalink raw reply
* Re: [PATCH] parse-opt: migrate builtin-apply.
From: Jacob Helwig @ 2008-12-28 0:05 UTC (permalink / raw)
To: Miklos Vajna; +Cc: Junio C Hamano, Rene Scharfe, Git
In-Reply-To: <1230419037-14820-1-git-send-email-vmiklos@frugalware.org>
s/how have to use/now has to use/ ;-)
On Dec 27, 2008, at 17:03, Miklos Vajna <vmiklos@frugalware.org> wrote:
> The only incompatible change is that the user how have to use '--'
> before a patch named --build-fake-ancestor=something.
>
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>
> On Sat, Dec 27, 2008 at 10:53:43PM +0100, René Scharfe <rene.scharfe@lsrfire.ath.c
> x> wrote:
>> Miklos Vajna schrieb:
>>> -static const char apply_usage[] =
>>> -"git apply [--stat] [--numstat] [--summary] [--check] [--index]
>>> [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-
>>> replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-
>>> CNUM] [--whitespace=<nowarn|warn|fix|error|error-all>] <patch>...";
>>> +static const char * const apply_usage[] = {
>>> + "git apply [--stat] [--numstat] [--summary] [--check] [--
>>> index] [--cached] [--apply] [--no-add] [--index-info] [--allow-
>>> binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-
>>> pNUM] [-CNUM] [--whitespace=<nowarn|warn|fix|error|error-all>]
>>> <patch>...",
>>> + NULL
>>> +};
>>
>> A useful convention with parse_options is to display "[options]" as a
>> place holder instead of listing all options explicitly in the usage
>> string. They are listed and explained in the full help message
>> anyway
>> shown by "git apply -?").
>
> True, changed.
>
>>> +static int option_parse_recount(const struct option *opt,
>>> + const char *arg, int unset)
>>> +{
>>> + options |= RECOUNT;
>>> + return 0;
>>> +}
>>
>> OPT_BIT?
>
> I haven't discovered it, you are right. :-)
>
>>> + OPT_INTEGER('C', NULL, &p_context,
>>> + "ensure at least <n> lines of context
>>> match"),
>>
>> p_context is an unsigned long variable; OPT_INTEGER expects a pointer
>> to an int. You'd either need an OPT_ULONG macro or change p_context
>> to in int. Doing the latter fixed the two test cases t4105 and t4252
>> for me.
>
> Thanks, the trick was that the test did not fail on i686, just on
> x86_64. I have changed it as you suggested and it now passes for me on
> x86_64 as well.
>
> Documentation/git-apply.txt | 4 +-
> builtin-apply.c | 281 ++++++++++++++++++++++
> +--------------------
> 2 files changed, 154 insertions(+), 131 deletions(-)
>
> diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
> index e726510..9400f6a 100644
> --- a/Documentation/git-apply.txt
> +++ b/Documentation/git-apply.txt
> @@ -10,7 +10,7 @@ SYNOPSIS
> --------
> [verse]
> 'git apply' [--stat] [--numstat] [--summary] [--check] [--index]
> - [--apply] [--no-add] [--build-fake-ancestor <file>] [-R | --
> reverse]
> + [--apply] [--no-add] [--build-fake-ancestor=<file>] [-R | --
> reverse]
> [--allow-binary-replacement | --binary] [--reject] [-z]
> [-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]
> [--whitespace=<nowarn|warn|fix|error|error-all>]
> @@ -64,7 +64,7 @@ OPTIONS
> cached data, apply the patch, and store the result in the index,
> without using the working tree. This implies '--index'.
>
> ---build-fake-ancestor <file>::
> +--build-fake-ancestor=<file>::
> Newer 'git-diff' output has embedded 'index information'
> for each blob to help identify the original version that
> the patch applies to. When this flag is given, and if
> diff --git a/builtin-apply.c b/builtin-apply.c
> index 07244b0..7603658 100644
> --- a/builtin-apply.c
> +++ b/builtin-apply.c
> @@ -14,6 +14,7 @@
> #include "builtin.h"
> #include "string-list.h"
> #include "dir.h"
> +#include "parse-options.h"
>
> /*
> * --check turns on checking that the working tree matches the
> @@ -45,9 +46,11 @@ static int apply_verbosely;
> static int no_add;
> static const char *fake_ancestor;
> static int line_termination = '\n';
> -static unsigned long p_context = ULONG_MAX;
> -static const char apply_usage[] =
> -"git apply [--stat] [--numstat] [--summary] [--check] [--index] [--
> cached] [--apply] [--no-add] [--index-info] [--allow-binary-
> replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM]
> [--whitespace=<nowarn|warn|fix|error|error-all>] <patch>...";
> +static unsigned int p_context = UINT_MAX;
> +static const char * const apply_usage[] = {
> + "git apply [options] [<patch>...]",
> + NULL
> +};
>
> static enum ws_error_action {
> nowarn_ws_error,
> @@ -61,6 +64,8 @@ static int applied_after_fixing_ws;
> static const char *patch_input_file;
> static const char *root;
> static int root_len;
> +static int read_stdin = 1;
> +static int options;
>
> static void parse_whitespace_option(const char *option)
> {
> @@ -3135,150 +3140,168 @@ static int git_apply_config(const char
> *var, const char *value, void *cb)
> return git_default_config(var, value, cb);
> }
>
> +static int option_parse_stdin(const struct option *opt,
> + const char *arg, int unset)
> +{
> + int *errs = opt->value;
> +
> + *errs |= apply_patch(0, "<stdin>", options);
> + read_stdin = 0;
> + return 0;
> +}
> +
> +static int option_parse_exclude(const struct option *opt,
> + const char *arg, int unset)
> +{
> + add_name_limit(arg, 1);
> + return 0;
> +}
> +
> +static int option_parse_include(const struct option *opt,
> + const char *arg, int unset)
> +{
> + add_name_limit(arg, 0);
> + has_include = 1;
> + return 0;
> +}
> +
> +static int option_parse_p(const struct option *opt,
> + const char *arg, int unset)
> +{
> + p_value = atoi(arg);
> + p_value_known = 1;
> + return 0;
> +}
> +
> +static int option_parse_z(const struct option *opt,
> + const char *arg, int unset)
> +{
> + if (unset)
> + line_termination = '\n';
> + else
> + line_termination = 0;
> + return 0;
> +}
> +
> +static int option_parse_whitespace(const struct option *opt,
> + const char *arg, int unset)
> +{
> + const char **whitespace_option = opt->value;
> +
> + *whitespace_option = arg;
> + parse_whitespace_option(arg);
> + return 0;
> +}
> +
> +static int option_parse_directory(const struct option *opt,
> + const char *arg, int unset)
> +{
> + root_len = strlen(arg);
> + if (root_len && arg[root_len - 1] != '/') {
> + char *new_root;
> + root = new_root = xmalloc(root_len + 2);
> + strcpy(new_root, arg);
> + strcpy(new_root + root_len++, "/");
> + } else
> + root = arg;
> + return 0;
> +}
>
> int cmd_apply(int argc, const char **argv, const char *unused_prefix)
> {
> int i;
> - int read_stdin = 1;
> - int options = 0;
> int errs = 0;
> int is_not_gitdir;
> + int binary;
> + int force_apply = 0;
>
> const char *whitespace_option = NULL;
>
> + struct option builtin_apply_options[] = {
> + { OPTION_CALLBACK, '-', NULL, &errs, NULL,
> + "read the patch from the standard input",
> + PARSE_OPT_NOARG, option_parse_stdin },
> + { OPTION_CALLBACK, 0, "exclude", NULL, "path",
> + "don´t apply changes matching the given path",
> + 0, option_parse_exclude },
> + { OPTION_CALLBACK, 0, "include", NULL, "path",
> + "apply changes matching the given path",
> + 0, option_parse_include },
> + { OPTION_CALLBACK, 'p', NULL, NULL, "num",
> + "remove <num> leading slashes from traditional diff
> paths",
> + 0, option_parse_p },
> + OPT_BOOLEAN(0, "no-add", &no_add,
> + "ignore additions made by the patch"),
> + OPT_BOOLEAN(0, "stat", &diffstat,
> + "instead of applying the patch, output diffstat for the
> input"),
> + OPT_BOOLEAN(0, "allow-binary-replacement", &binary,
> + "now no-op"),
> + OPT_BOOLEAN(0, "binary", &binary,
> + "now no-op"),
> + OPT_BOOLEAN(0, "numstat", &numstat,
> + "shows number of added and deleted lines in decimal
> notation"),
> + OPT_BOOLEAN(0, "summary", &summary,
> + "instead of applying the patch, output a summary for
> the input"),
> + OPT_BOOLEAN(0, "check", &check,
> + "instead of applying the patch, see if the patch is
> applicable"),
> + OPT_BOOLEAN(0, "index", &check_index,
> + "make sure the patch is applicable to the current
> index"),
> + OPT_BOOLEAN(0, "cached", &cached,
> + "apply a patch without touching the working tree"),
> + OPT_BOOLEAN(0, "apply", &force_apply,
> + "also apply the patch (use with --stat/--summary/--
> check)"),
> + OPT_STRING(0, "build-fake-ancestor", &fake_ancestor, "file",
> + "build a temporary index based on embedded index
> information"),
> + { OPTION_CALLBACK, 'z', NULL, NULL, NULL,
> + "paths are separated with NUL character",
> + PARSE_OPT_NOARG, option_parse_z },
> + OPT_INTEGER('C', NULL, &p_context,
> + "ensure at least <n> lines of context match"),
> + { OPTION_CALLBACK, 0, "whitespace", &whitespace_option,
> "action",
> + "detect new or modified lines that have whitespace
> errors",
> + 0, option_parse_whitespace },
> + OPT_BOOLEAN('R', "reverse", &apply_in_reverse,
> + "apply the patch in reverse"),
> + OPT_BOOLEAN(0, "unidiff-zero", &unidiff_zero,
> + "don't expect at least one line of context"),
> + OPT_BOOLEAN(0, "reject", &apply_with_reject,
> + "leave the rejected hunks in corresponding *.rej files"),
> + OPT__VERBOSE(&apply_verbosely),
> + OPT_BIT(0, "inaccurate-eof", &options,
> + "tolerate incorrectly detected missing new-line at the
> end of file",
> + INACCURATE_EOF),
> + OPT_BIT(0, "recount", &options,
> + "do not trust the line counts in the hunk headers",
> + RECOUNT),
> + { OPTION_CALLBACK, 0, "directory", NULL, "root",
> + "prepend <root> to all filenames",
> + 0, option_parse_directory },
> + OPT_END()
> + };
> +
> prefix = setup_git_directory_gently(&is_not_gitdir);
> prefix_length = prefix ? strlen(prefix) : 0;
> git_config(git_apply_config, NULL);
> if (apply_default_whitespace)
> parse_whitespace_option(apply_default_whitespace);
>
> - for (i = 1; i < argc; i++) {
> + argc = parse_options(argc, argv, builtin_apply_options,
> + apply_usage, 0);
> + if (apply_with_reject)
> + apply = apply_verbosely = 1;
> + if (!force_apply && (diffstat || numstat || summary || check ||
> fake_ancestor))
> + apply = 0;
> + if (check_index && is_not_gitdir)
> + die("--index outside a repository");
> + if (cached) {
> + if (is_not_gitdir)
> + die("--cached outside a repository");
> + check_index = 1;
> + }
> + for (i = 0; i < argc; i++) {
> const char *arg = argv[i];
> - char *end;
> int fd;
>
> - if (!strcmp(arg, "-")) {
> - errs |= apply_patch(0, "<stdin>", options);
> - read_stdin = 0;
> - continue;
> - }
> - if (!prefixcmp(arg, "--exclude=")) {
> - add_name_limit(arg + 10, 1);
> - continue;
> - }
> - if (!prefixcmp(arg, "--include=")) {
> - add_name_limit(arg + 10, 0);
> - has_include = 1;
> - continue;
> - }
> - if (!prefixcmp(arg, "-p")) {
> - p_value = atoi(arg + 2);
> - p_value_known = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--no-add")) {
> - no_add = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--stat")) {
> - apply = 0;
> - diffstat = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--allow-binary-replacement") ||
> - !strcmp(arg, "--binary")) {
> - continue; /* now no-op */
> - }
> - if (!strcmp(arg, "--numstat")) {
> - apply = 0;
> - numstat = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--summary")) {
> - apply = 0;
> - summary = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--check")) {
> - apply = 0;
> - check = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--index")) {
> - if (is_not_gitdir)
> - die("--index outside a repository");
> - check_index = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--cached")) {
> - if (is_not_gitdir)
> - die("--cached outside a repository");
> - check_index = 1;
> - cached = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--apply")) {
> - apply = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--build-fake-ancestor")) {
> - apply = 0;
> - if (++i >= argc)
> - die ("need a filename");
> - fake_ancestor = argv[i];
> - continue;
> - }
> - if (!strcmp(arg, "-z")) {
> - line_termination = 0;
> - continue;
> - }
> - if (!prefixcmp(arg, "-C")) {
> - p_context = strtoul(arg + 2, &end, 0);
> - if (*end != '\0')
> - die("unrecognized context count '%s'", arg + 2);
> - continue;
> - }
> - if (!prefixcmp(arg, "--whitespace=")) {
> - whitespace_option = arg + 13;
> - parse_whitespace_option(arg + 13);
> - continue;
> - }
> - if (!strcmp(arg, "-R") || !strcmp(arg, "--reverse")) {
> - apply_in_reverse = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--unidiff-zero")) {
> - unidiff_zero = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--reject")) {
> - apply = apply_with_reject = apply_verbosely = 1;
> - continue;
> - }
> - if (!strcmp(arg, "-v") || !strcmp(arg, "--verbose")) {
> - apply_verbosely = 1;
> - continue;
> - }
> - if (!strcmp(arg, "--inaccurate-eof")) {
> - options |= INACCURATE_EOF;
> - continue;
> - }
> - if (!strcmp(arg, "--recount")) {
> - options |= RECOUNT;
> - continue;
> - }
> - if (!prefixcmp(arg, "--directory=")) {
> - arg += strlen("--directory=");
> - root_len = strlen(arg);
> - if (root_len && arg[root_len - 1] != '/') {
> - char *new_root;
> - root = new_root = xmalloc(root_len + 2);
> - strcpy(new_root, arg);
> - strcpy(new_root + root_len++, "/");
> - } else
> - root = arg;
> - continue;
> - }
> if (0 < prefix_length)
> arg = prefix_filename(prefix, prefix_length, arg);
>
> --
> 1.6.1.rc1.35.gae26e.dirty
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 3/3] pretty: support multiline subjects with format:
From: Markus Heidelberg @ 2008-12-27 23:24 UTC (permalink / raw)
To: René Scharfe; +Cc: git
In-Reply-To: <1230338961.8363.101.camel@ubuntu.ubuntu-domain>
Hello,
I hope I got the In-Reply-To right, the message was sent before my
subscription to this list.
René Scharfe, 27.12.2008:
> git log --pretty=format:%s (and tformat:) used to display the first
> line of the subject, unlike the other --pretty options, which would
> construct a subject line from all lines of the first paragraph of
> the commit message.
And that can be very annoying when working on repositories with a
history not formatted after the recommendations of git (empty line after
the summary). Then the output of commands like
"git log --pretty=oneline", "git format-patch" and "git show-branch"
is unreadable.
Sorry, I haven't tested your patch set, what is the output of
git-shortlog like now?
> For consistency and increased code reuse, change format: to do the
> same as the other options.
What's wrong with using the first line instead of the first paragraph
for the other pretty options and for cases where only a small subject
line is desired? A sentence would be broken into a small uncomplete part
for the subject for example. What else?
Markus
^ permalink raw reply
* git clone - failing on cygwin with git:// but not with ssh://
From: Joe Casadonte @ 2008-12-27 22:37 UTC (permalink / raw)
To: git
Hi,
I'm new to git, so my apologies if I'm missing something pretty
basic. Here's my setup:
"Public" server
---------------
OS: RedHat clone, 2.6.9 kernel
git version: self-compiled, 1.6.0.6
Test client #1 (works)
----------------------
OS: RedHat clone, 2.6.9 kernel
git version: self-compiled, 1.6.0.6
Test client #2 (fails)
----------------------
OS: Win XP Pro
git version: cygwin compiled, 1.6.0.4
I have a new repository on the "public" server, and have cloned it on
test client #1 with:
$ git clone git://foobar/myproj.git
Initialized empty Git repository in /opt/myproj/.git/
remote: Counting objects: 104, done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 104 (delta 22), reused 104 (delta 22)
Receiving objects: 100% (104/104), 76.97 KiB, done.
Resolving deltas: 100% (22/22), done.
I try the same thing on test box #2 and receive:
D:\temp>git clone git://foobar/otminfmyproj.git
Initialized empty Git repository in /cygdrive/d/temp/foobar/.git/
fatal: read error (Socket operation on non-socket)
fatal: early EOF
fatal: index-pack failed
I've turned on verbose logging in the daemon and I see the following
messages:
Dec 27 17:31:53 foobar git-daemon: [30327] Connection from 192.168.1.102:2598
Dec 27 17:31:53 foobar git-daemon: [30327] Extended attributes (16 bytes) exist <host=foobar>
Dec 27 17:31:53 foobar git-daemon: [30327] Request upload-pack for '/myproj.git'
Dec 27 17:31:55 foobar git-daemon: [30327] Disconnected (with error)
A successful log (from test client #1) shows practically the same
thing:
Dec 27 17:33:22 foobar git-daemon: [30338] Connection from 192.168.2.101:44832
Dec 27 17:33:22 foobar git-daemon: [30338] Extended attributes (16 bytes) exist <host=foobar>
Dec 27 17:33:22 foobar git-daemon: [30338] Request upload-pack for '/myproj.git'
Dec 27 17:33:22 foobar git-daemon: [30338] Disconnected
Running the clone via ssh protocol from test client #2 works, though:
D:\temp>git clone ssh://root@foobar/nfs02/git/myproj
Initialized empty Git repository in /cygdrive/d/temp/myproj/.git/
remote: Counting objects: 104, done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 104 (delta 22), reused 104 (delta 22)
Receiving objects: 100% (104/104), 76.97 KiB | 9 KiB/s, done.
Resolving deltas: 100% (22/22), done.
The same test machine has cloned from a different linux server via the
git protocol just fine.
Any ideas? Thanks for the help!
--
Regards,
joe
Joe Casadonte
jcasadonte@northbound-train.com
------------------------------------------------------------------------------
Llama Fresh Farms => http://www.northbound-train.com
Ramblings of a Gay Man => http://www.northbound-train.com/ramblings
Emacs Stuff => http://www.northbound-train.com/emacs.html
Music CD Trading => http://www.northbound-train.com/cdr.html
------------------------------------------------------------------------------
Live Free, that's the message!
------------------------------------------------------------------------------
^ permalink raw reply
* [PATCH] parse-opt: migrate builtin-apply.
From: Miklos Vajna @ 2008-12-27 23:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Rene Scharfe, git
In-Reply-To: <4956A3E7.7070208@lsrfire.ath.cx>
The only incompatible change is that the user how have to use '--'
before a patch named --build-fake-ancestor=something.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Sat, Dec 27, 2008 at 10:53:43PM +0100, René Scharfe <rene.scharfe@lsrfire.ath.cx> wrote:
> Miklos Vajna schrieb:
> > -static const char apply_usage[] =
> > -"git apply [--stat] [--numstat] [--summary] [--check] [--index] [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM] [--whitespace=<nowarn|warn|fix|error|error-all>] <patch>...";
> > +static const char * const apply_usage[] = {
> > + "git apply [--stat] [--numstat] [--summary] [--check] [--index] [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM] [--whitespace=<nowarn|warn|fix|error|error-all>] <patch>...",
> > + NULL
> > +};
>
> A useful convention with parse_options is to display "[options]" as a
> place holder instead of listing all options explicitly in the usage
> string. They are listed and explained in the full help message anyway
> shown by "git apply -?").
True, changed.
> > +static int option_parse_recount(const struct option *opt,
> > + const char *arg, int unset)
> > +{
> > + options |= RECOUNT;
> > + return 0;
> > +}
>
> OPT_BIT?
I haven't discovered it, you are right. :-)
> > + OPT_INTEGER('C', NULL, &p_context,
> > + "ensure at least <n> lines of context match"),
>
> p_context is an unsigned long variable; OPT_INTEGER expects a pointer
> to an int. You'd either need an OPT_ULONG macro or change p_context
> to in int. Doing the latter fixed the two test cases t4105 and t4252
> for me.
Thanks, the trick was that the test did not fail on i686, just on
x86_64. I have changed it as you suggested and it now passes for me on
x86_64 as well.
Documentation/git-apply.txt | 4 +-
builtin-apply.c | 281 +++++++++++++++++++++++--------------------
2 files changed, 154 insertions(+), 131 deletions(-)
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index e726510..9400f6a 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git apply' [--stat] [--numstat] [--summary] [--check] [--index]
- [--apply] [--no-add] [--build-fake-ancestor <file>] [-R | --reverse]
+ [--apply] [--no-add] [--build-fake-ancestor=<file>] [-R | --reverse]
[--allow-binary-replacement | --binary] [--reject] [-z]
[-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]
[--whitespace=<nowarn|warn|fix|error|error-all>]
@@ -64,7 +64,7 @@ OPTIONS
cached data, apply the patch, and store the result in the index,
without using the working tree. This implies '--index'.
---build-fake-ancestor <file>::
+--build-fake-ancestor=<file>::
Newer 'git-diff' output has embedded 'index information'
for each blob to help identify the original version that
the patch applies to. When this flag is given, and if
diff --git a/builtin-apply.c b/builtin-apply.c
index 07244b0..7603658 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -14,6 +14,7 @@
#include "builtin.h"
#include "string-list.h"
#include "dir.h"
+#include "parse-options.h"
/*
* --check turns on checking that the working tree matches the
@@ -45,9 +46,11 @@ static int apply_verbosely;
static int no_add;
static const char *fake_ancestor;
static int line_termination = '\n';
-static unsigned long p_context = ULONG_MAX;
-static const char apply_usage[] =
-"git apply [--stat] [--numstat] [--summary] [--check] [--index] [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM] [--whitespace=<nowarn|warn|fix|error|error-all>] <patch>...";
+static unsigned int p_context = UINT_MAX;
+static const char * const apply_usage[] = {
+ "git apply [options] [<patch>...]",
+ NULL
+};
static enum ws_error_action {
nowarn_ws_error,
@@ -61,6 +64,8 @@ static int applied_after_fixing_ws;
static const char *patch_input_file;
static const char *root;
static int root_len;
+static int read_stdin = 1;
+static int options;
static void parse_whitespace_option(const char *option)
{
@@ -3135,150 +3140,168 @@ static int git_apply_config(const char *var, const char *value, void *cb)
return git_default_config(var, value, cb);
}
+static int option_parse_stdin(const struct option *opt,
+ const char *arg, int unset)
+{
+ int *errs = opt->value;
+
+ *errs |= apply_patch(0, "<stdin>", options);
+ read_stdin = 0;
+ return 0;
+}
+
+static int option_parse_exclude(const struct option *opt,
+ const char *arg, int unset)
+{
+ add_name_limit(arg, 1);
+ return 0;
+}
+
+static int option_parse_include(const struct option *opt,
+ const char *arg, int unset)
+{
+ add_name_limit(arg, 0);
+ has_include = 1;
+ return 0;
+}
+
+static int option_parse_p(const struct option *opt,
+ const char *arg, int unset)
+{
+ p_value = atoi(arg);
+ p_value_known = 1;
+ return 0;
+}
+
+static int option_parse_z(const struct option *opt,
+ const char *arg, int unset)
+{
+ if (unset)
+ line_termination = '\n';
+ else
+ line_termination = 0;
+ return 0;
+}
+
+static int option_parse_whitespace(const struct option *opt,
+ const char *arg, int unset)
+{
+ const char **whitespace_option = opt->value;
+
+ *whitespace_option = arg;
+ parse_whitespace_option(arg);
+ return 0;
+}
+
+static int option_parse_directory(const struct option *opt,
+ const char *arg, int unset)
+{
+ root_len = strlen(arg);
+ if (root_len && arg[root_len - 1] != '/') {
+ char *new_root;
+ root = new_root = xmalloc(root_len + 2);
+ strcpy(new_root, arg);
+ strcpy(new_root + root_len++, "/");
+ } else
+ root = arg;
+ return 0;
+}
int cmd_apply(int argc, const char **argv, const char *unused_prefix)
{
int i;
- int read_stdin = 1;
- int options = 0;
int errs = 0;
int is_not_gitdir;
+ int binary;
+ int force_apply = 0;
const char *whitespace_option = NULL;
+ struct option builtin_apply_options[] = {
+ { OPTION_CALLBACK, '-', NULL, &errs, NULL,
+ "read the patch from the standard input",
+ PARSE_OPT_NOARG, option_parse_stdin },
+ { OPTION_CALLBACK, 0, "exclude", NULL, "path",
+ "don´t apply changes matching the given path",
+ 0, option_parse_exclude },
+ { OPTION_CALLBACK, 0, "include", NULL, "path",
+ "apply changes matching the given path",
+ 0, option_parse_include },
+ { OPTION_CALLBACK, 'p', NULL, NULL, "num",
+ "remove <num> leading slashes from traditional diff paths",
+ 0, option_parse_p },
+ OPT_BOOLEAN(0, "no-add", &no_add,
+ "ignore additions made by the patch"),
+ OPT_BOOLEAN(0, "stat", &diffstat,
+ "instead of applying the patch, output diffstat for the input"),
+ OPT_BOOLEAN(0, "allow-binary-replacement", &binary,
+ "now no-op"),
+ OPT_BOOLEAN(0, "binary", &binary,
+ "now no-op"),
+ OPT_BOOLEAN(0, "numstat", &numstat,
+ "shows number of added and deleted lines in decimal notation"),
+ OPT_BOOLEAN(0, "summary", &summary,
+ "instead of applying the patch, output a summary for the input"),
+ OPT_BOOLEAN(0, "check", &check,
+ "instead of applying the patch, see if the patch is applicable"),
+ OPT_BOOLEAN(0, "index", &check_index,
+ "make sure the patch is applicable to the current index"),
+ OPT_BOOLEAN(0, "cached", &cached,
+ "apply a patch without touching the working tree"),
+ OPT_BOOLEAN(0, "apply", &force_apply,
+ "also apply the patch (use with --stat/--summary/--check)"),
+ OPT_STRING(0, "build-fake-ancestor", &fake_ancestor, "file",
+ "build a temporary index based on embedded index information"),
+ { OPTION_CALLBACK, 'z', NULL, NULL, NULL,
+ "paths are separated with NUL character",
+ PARSE_OPT_NOARG, option_parse_z },
+ OPT_INTEGER('C', NULL, &p_context,
+ "ensure at least <n> lines of context match"),
+ { OPTION_CALLBACK, 0, "whitespace", &whitespace_option, "action",
+ "detect new or modified lines that have whitespace errors",
+ 0, option_parse_whitespace },
+ OPT_BOOLEAN('R', "reverse", &apply_in_reverse,
+ "apply the patch in reverse"),
+ OPT_BOOLEAN(0, "unidiff-zero", &unidiff_zero,
+ "don't expect at least one line of context"),
+ OPT_BOOLEAN(0, "reject", &apply_with_reject,
+ "leave the rejected hunks in corresponding *.rej files"),
+ OPT__VERBOSE(&apply_verbosely),
+ OPT_BIT(0, "inaccurate-eof", &options,
+ "tolerate incorrectly detected missing new-line at the end of file",
+ INACCURATE_EOF),
+ OPT_BIT(0, "recount", &options,
+ "do not trust the line counts in the hunk headers",
+ RECOUNT),
+ { OPTION_CALLBACK, 0, "directory", NULL, "root",
+ "prepend <root> to all filenames",
+ 0, option_parse_directory },
+ OPT_END()
+ };
+
prefix = setup_git_directory_gently(&is_not_gitdir);
prefix_length = prefix ? strlen(prefix) : 0;
git_config(git_apply_config, NULL);
if (apply_default_whitespace)
parse_whitespace_option(apply_default_whitespace);
- for (i = 1; i < argc; i++) {
+ argc = parse_options(argc, argv, builtin_apply_options,
+ apply_usage, 0);
+ if (apply_with_reject)
+ apply = apply_verbosely = 1;
+ if (!force_apply && (diffstat || numstat || summary || check || fake_ancestor))
+ apply = 0;
+ if (check_index && is_not_gitdir)
+ die("--index outside a repository");
+ if (cached) {
+ if (is_not_gitdir)
+ die("--cached outside a repository");
+ check_index = 1;
+ }
+ for (i = 0; i < argc; i++) {
const char *arg = argv[i];
- char *end;
int fd;
- if (!strcmp(arg, "-")) {
- errs |= apply_patch(0, "<stdin>", options);
- read_stdin = 0;
- continue;
- }
- if (!prefixcmp(arg, "--exclude=")) {
- add_name_limit(arg + 10, 1);
- continue;
- }
- if (!prefixcmp(arg, "--include=")) {
- add_name_limit(arg + 10, 0);
- has_include = 1;
- continue;
- }
- if (!prefixcmp(arg, "-p")) {
- p_value = atoi(arg + 2);
- p_value_known = 1;
- continue;
- }
- if (!strcmp(arg, "--no-add")) {
- no_add = 1;
- continue;
- }
- if (!strcmp(arg, "--stat")) {
- apply = 0;
- diffstat = 1;
- continue;
- }
- if (!strcmp(arg, "--allow-binary-replacement") ||
- !strcmp(arg, "--binary")) {
- continue; /* now no-op */
- }
- if (!strcmp(arg, "--numstat")) {
- apply = 0;
- numstat = 1;
- continue;
- }
- if (!strcmp(arg, "--summary")) {
- apply = 0;
- summary = 1;
- continue;
- }
- if (!strcmp(arg, "--check")) {
- apply = 0;
- check = 1;
- continue;
- }
- if (!strcmp(arg, "--index")) {
- if (is_not_gitdir)
- die("--index outside a repository");
- check_index = 1;
- continue;
- }
- if (!strcmp(arg, "--cached")) {
- if (is_not_gitdir)
- die("--cached outside a repository");
- check_index = 1;
- cached = 1;
- continue;
- }
- if (!strcmp(arg, "--apply")) {
- apply = 1;
- continue;
- }
- if (!strcmp(arg, "--build-fake-ancestor")) {
- apply = 0;
- if (++i >= argc)
- die ("need a filename");
- fake_ancestor = argv[i];
- continue;
- }
- if (!strcmp(arg, "-z")) {
- line_termination = 0;
- continue;
- }
- if (!prefixcmp(arg, "-C")) {
- p_context = strtoul(arg + 2, &end, 0);
- if (*end != '\0')
- die("unrecognized context count '%s'", arg + 2);
- continue;
- }
- if (!prefixcmp(arg, "--whitespace=")) {
- whitespace_option = arg + 13;
- parse_whitespace_option(arg + 13);
- continue;
- }
- if (!strcmp(arg, "-R") || !strcmp(arg, "--reverse")) {
- apply_in_reverse = 1;
- continue;
- }
- if (!strcmp(arg, "--unidiff-zero")) {
- unidiff_zero = 1;
- continue;
- }
- if (!strcmp(arg, "--reject")) {
- apply = apply_with_reject = apply_verbosely = 1;
- continue;
- }
- if (!strcmp(arg, "-v") || !strcmp(arg, "--verbose")) {
- apply_verbosely = 1;
- continue;
- }
- if (!strcmp(arg, "--inaccurate-eof")) {
- options |= INACCURATE_EOF;
- continue;
- }
- if (!strcmp(arg, "--recount")) {
- options |= RECOUNT;
- continue;
- }
- if (!prefixcmp(arg, "--directory=")) {
- arg += strlen("--directory=");
- root_len = strlen(arg);
- if (root_len && arg[root_len - 1] != '/') {
- char *new_root;
- root = new_root = xmalloc(root_len + 2);
- strcpy(new_root, arg);
- strcpy(new_root + root_len++, "/");
- } else
- root = arg;
- continue;
- }
if (0 < prefix_length)
arg = prefix_filename(prefix, prefix_length, arg);
--
1.6.1.rc1.35.gae26e.dirty
^ permalink raw reply related
* Re: [PATCH 2/2] grep: grep cache entries if they are "assume unchanged"
From: Junio C Hamano @ 2008-12-27 22:39 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git, Daniel Barkalow
In-Reply-To: <1230366064-1306-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> ... External grep case has not been fixed yet. But given that
> on the platform that CE_VALID bit may be used like Windows, external
> grep is not available anyway, I would wait for people to raise their
> hands before touching it.
My gut feeling is that it would suffice to always use the internal grep if
there is any index entry with CE_VALID set. Having the bit is an unusual
case.
Also I am guessing that your above statement that users on Windows would
be the ones who want CE_VALID implies that CE_VALID is for platforms where
file operations are slow. If that is really the case, the internal grep
might even have performance advantage over external grep.
No, I haven't benched the internal grep recently.
^ permalink raw reply
* Re: [PATCH] Documentation/git-format-patch.txt: fix weird backslash at --root
From: jidanni @ 2008-12-27 22:36 UTC (permalink / raw)
To: gitster; +Cc: git
In-Reply-To: <7v4p0pcliy.fsf@gitster.siamese.dyndns.org>
JCH> http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html
That looks OK. All I know is on Debian (1:1.5.6.5-2) it gets rendered:
$ w3m -dump /usr/share/doc/git-doc/git-format-patch.html|fgrep \\-
$ git format-patch \--root origin
I was patching offline from Debian. OK, in the future I will clone
upstream directly properly first.
^ permalink raw reply
* Re: [PATCH] Documentation/git-format-patch.txt: fix weird backslash at --root
From: Junio C Hamano @ 2008-12-27 22:15 UTC (permalink / raw)
To: jidanni; +Cc: git
In-Reply-To: <E1LGfLz-0001nM-AO@jidanni.org>
jidanni@jidanni.org writes:
> @@ -209 +209 @@ project:
> -$ git format-patch \--root origin
> +$ git format-patch --root origin
I thought these backslashes before double-dash are protecting the latter
from being turned into em-dashes. I do not see any weird backslash in the
"git help" (aka "manpage") output nor in the HTML documentation, e.g.
http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html
without your patch, so I have to say that this chunk is a useless churn.
All of your three patches lack context, which is essential enabler for
easier review. They have "diff --git" header, but are not made relative
to the root of the project tree (i.e. lack "Documentation/" prefix), which
is the norm for both the tool and for this project and this mailing list.
I guess that you may be experimenting with various options to see how they
work, and the curiosity by itself is a good thing, but please do not make
other people suffer with results from such experiments by sending patches
in nonstandard forms.
By submitting a patch to try improving the system, you are already making
a difference in substance. Please do not try to be creative in form. It
only makes lives of other people unnecessarily harder with no real reason
and wastes other people's time. And it wastes yours, too. A patch
conforming to the norm is much easier to review, comment on and apply.
Ok?
"Don't try to be different in form, make a difference in substance" also
applies to your S-o-b line, by the way.
^ permalink raw reply
* Re: [PATCH] Documentation/diff-options.txt: unify options
From: jidanni @ 2008-12-27 22:08 UTC (permalink / raw)
To: gitster; +Cc: git
In-Reply-To: <7vfxk9cm6w.fsf@gitster.siamese.dyndns.org>
JCH> Sorry, but this patch is very unusual in that it lacks any context lines,
JCH> which makes it impossible to review.
Trust me, I tried it with the default context lines and it was just
the same hard reading. OK, next time I send patches for other files, I
will always use the default and forget about saving bytes.
^ permalink raw reply
* Re: [PATCH] Documentation/diff-options.txt: unify options
From: Junio C Hamano @ 2008-12-27 22:01 UTC (permalink / raw)
To: jidanni; +Cc: git
In-Reply-To: <E1LGfY3-0001pM-S9@jidanni.org>
jidanni@jidanni.org writes:
> Signed-off-by: jidanni <jidanni@jidanni.org>
>
> diff --git a/diff-options.txt b/diff-options.txt
> index 5721548..b05503a 100644
> --- a/diff-options.txt
> +++ b/diff-options.txt
> @@ -21,0 +22 @@ ifndef::git-format-patch[]
> +-u::
> @@ -26,3 +26,0 @@ endif::git-format-patch[]
> --u::
> - Synonym for "-p".
> -
Sorry, but this patch is very unusual in that it lacks any context lines,
which makes it impossible to review.
^ permalink raw reply
* for newbs = little exercise / tutorial / warmup for windows and other non-sophisticated new Git users :-)
From: Zorba @ 2008-12-27 21:56 UTC (permalink / raw)
To: git
Here is a little exercise / tutorial / warm-up for someone starting out with
Git. If you're anyting like me you may find the tutorials etc. on git.or.cz
a bit daunting. I recommend you try this after reading the user manual but
before tearing your hair out trying to follow all the examples in the user
manual. After you've followed this simple workflow, then go back to the more
advanced stuff in the tutorials and user manuals (like cloning repositories
and creating and merging branches).
I created this exercise to try and model our workflow and what we wanted to
use git for = tracking a project with multiple files where the filebase
might change frequently from one version to the next.
http://siliconmouth.wordpress.com/category/nerdy/
look for December 27, 2008 or "git warmup"
^ permalink raw reply
* Re: [PATCH] git-send-email.txt: move --format-patch paragraph to a proper location
From: Junio C Hamano @ 2008-12-27 21:54 UTC (permalink / raw)
To: Adeodato Simó; +Cc: git
In-Reply-To: <1230367830-6114-1-git-send-email-dato@net.com.org.es>
Adeodato Simó <dato@net.com.org.es> writes:
> When introducing --format-patch, its documentation was accidentally inserted
> in the middle of documentation for --validate.
Good eyes. Thanks.
^ permalink raw reply
* Re: [PATCH v2] parse-opt: migrate builtin-apply.
From: René Scharfe @ 2008-12-27 21:53 UTC (permalink / raw)
To: Miklos Vajna; +Cc: Junio C Hamano, git
In-Reply-To: <1230387764-11230-1-git-send-email-vmiklos@frugalware.org>
Miklos Vajna schrieb:
> -static const char apply_usage[] =
> -"git apply [--stat] [--numstat] [--summary] [--check] [--index] [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM] [--whitespace=<nowarn|warn|fix|error|error-all>] <patch>...";
> +static const char * const apply_usage[] = {
> + "git apply [--stat] [--numstat] [--summary] [--check] [--index] [--cached] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [--reverse] [--reject] [--verbose] [-z] [-pNUM] [-CNUM] [--whitespace=<nowarn|warn|fix|error|error-all>] <patch>...",
> + NULL
> +};
A useful convention with parse_options is to display "[options]" as a
place holder instead of listing all options explicitly in the usage
string. They are listed and explained in the full help message anyway
shown by "git apply -?").
> +static int option_parse_inaccurate(const struct option *opt,
> + const char *arg, int unset)
> +{
> + options |= INACCURATE_EOF;
> + return 0;
> +}
> +
> +static int option_parse_recount(const struct option *opt,
> + const char *arg, int unset)
> +{
> + options |= RECOUNT;
> + return 0;
> +}
OPT_BIT?
> + OPT_INTEGER('C', NULL, &p_context,
> + "ensure at least <n> lines of context match"),
p_context is an unsigned long variable; OPT_INTEGER expects a pointer
to an int. You'd either need an OPT_ULONG macro or change p_context
to in int. Doing the latter fixed the two test cases t4105 and t4252
for me.
René
^ permalink raw reply
* Re: [PATCH v2] parse-opt: migrate builtin-apply.
From: Junio C Hamano @ 2008-12-27 21:47 UTC (permalink / raw)
To: Miklos Vajna; +Cc: git
In-Reply-To: <1230387764-11230-1-git-send-email-vmiklos@frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> writes:
> +static int option_parse_inaccurate(const struct option *opt,
> + const char *arg, int unset)
> +{
> + options |= INACCURATE_EOF;
> + return 0;
> +}
> +
> +static int option_parse_recount(const struct option *opt,
> + const char *arg, int unset)
> +{
> + options |= RECOUNT;
> + return 0;
> +}
I still haven't applied and ran the testsuite myself, but these makes me
wonder if there isn't a built-in "bit" type support in parse_options().
^ permalink raw reply
* Re: Fix commit message after push?
From: Miklos Vajna @ 2008-12-27 21:19 UTC (permalink / raw)
To: skillzero; +Cc: git
In-Reply-To: <2729632a0812271313l74e9bb85l857a3ad3a3f0d8d8@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
On Sat, Dec 27, 2008 at 01:13:46PM -0800, skillzero@gmail.com wrote:
> Is there a way to fix a commit message after the commit has already
> pushed to someone else? I typed the wrong commit message then I pushed
> to the remote repository before realizing it. I tried git commit
> --amend to fix it in my local repository, but it rejects the
> subsequent push. I somewhat understand why it's rejecting it (my
> --amend rewrote history and now they are out-of-sync), but I was
> wondering if there is a general way to handle situations like this
> with git.
git push -f
http://git.or.cz/gitwiki/GitFaq#head-c1dc263aca199d347f28872249e6c1f5d519a2df
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* [PATCH] Documentation/git-tag.txt grammar
From: jidanni @ 2008-12-27 19:49 UTC (permalink / raw)
To: git
Signed-off-by: jidanni <jidanni@jidanni.org>
diff --git a/git-tag.txt b/git-tag.txt
index 6cf11ce..e5503be 100644
--- a/git-tag.txt
+++ b/git-tag.txt
@@ -72 +72 @@ OPTIONS
- If multiple `-m` options are given, there values are
+ If multiple `-m` options are given, their values are
@@ -209 +209 @@ the boundary between one circle of people (e.g. "people who are
-primarily interested in networking part of the kernel") who may
+primarily interested in the networking part of the kernel") who may
--
1.5.6.5
^ permalink raw reply related
* [PATCH] Documentation/diff-options.txt: unify options
From: jidanni @ 2008-12-27 20:12 UTC (permalink / raw)
To: git
Signed-off-by: jidanni <jidanni@jidanni.org>
diff --git a/diff-options.txt b/diff-options.txt
index 5721548..b05503a 100644
--- a/diff-options.txt
+++ b/diff-options.txt
@@ -21,0 +22 @@ ifndef::git-format-patch[]
+-u::
@@ -26,3 +26,0 @@ endif::git-format-patch[]
--u::
- Synonym for "-p".
-
@@ -30,2 +27,0 @@ endif::git-format-patch[]
- Shorthand for "--unified=<n>".
-
@@ -189,0 +186 @@ endif::git-format-patch[]
+-a::
@@ -193,3 +189,0 @@ endif::git-format-patch[]
--a::
- Shorthand for "--text".
-
@@ -198,0 +193 @@ endif::git-format-patch[]
+-b::
@@ -204,3 +199 @@ endif::git-format-patch[]
--b::
- Shorthand for "--ignore-space-change".
-
+-w::
@@ -212,3 +204,0 @@ endif::git-format-patch[]
--w::
- Shorthand for "--ignore-all-space".
-
--
1.5.6.5
^ permalink raw reply related
* [PATCH] Documentation/git-format-patch.txt: fix weird backslash at --root
From: jidanni @ 2008-12-27 19:57 UTC (permalink / raw)
To: git
However note --root is not mentioned in SYNOPSIS nor on its own line.
Also fixed grammar.
Signed-off-by: jidanni <jidanni@jidanni.org>
diff --git a/git-format-patch.txt b/git-format-patch.txt
index ee27eff..51c25cd 100644
--- a/git-format-patch.txt
+++ b/git-format-patch.txt
@@ -48 +48 @@ everything since project inception to one commit, say "git
-format-patch \--root <commit>" to make it clear that it is the
+format-patch --root <commit>" to make it clear that it is the
@@ -166 +166 @@ not add any suffix.
- that they differ. Note that this disable the patch to be properly
+ that they differ. Note that this disables the patch from being properly
@@ -209 +209 @@ project:
-$ git format-patch \--root origin
+$ git format-patch --root origin
--
1.5.6.5
^ permalink raw reply related
* Fix commit message after push?
From: skillzero @ 2008-12-27 21:13 UTC (permalink / raw)
To: git
Is there a way to fix a commit message after the commit has already
pushed to someone else? I typed the wrong commit message then I pushed
to the remote repository before realizing it. I tried git commit
--amend to fix it in my local repository, but it rejects the
subsequent push. I somewhat understand why it's rejecting it (my
--amend rewrote history and now they are out-of-sync), but I was
wondering if there is a general way to handle situations like this
with git.
^ permalink raw reply
* Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.
From: Jan Krüger @ 2008-12-27 19:15 UTC (permalink / raw)
To: Adeodato Simó; +Cc: git, gitster
In-Reply-To: <20081227184001.GA31893@chistera.yi.org>
Hi,
On Sat, 27 Dec 2008 19:40:01 +0100
"Adeodato Simó" <dato@net.com.org.es> wrote:
> > I think it might be a good idea to allow overriding the config
> > variable in the other direction, i.e. a --no-signoff option to
> > commit. [...]
>
> Good catch.
>
> --no-signoff exists already, so maybe git-rebase should just use it?
Oh, yeah, I didn't notice the option mechanism worked this way and the
options got parsed after processing the config variables. I guess
rebase and rebase--interactive should use it, then, and perhaps there
are other commands that should that I just don't know about (a grep
across all commands implemented in shell script didn't find anything
else, though).
-Jan
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox