Git development
 help / color / mirror / Atom feed
* 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

* 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

* 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: 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 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: 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: 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

* [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: 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

* Re: [PATCH 3/3] pretty: support multiline subjects with format:
From: Miklos Vajna @ 2008-12-28  1:44 UTC (permalink / raw)
  To: Nanako Shiraishi; +Cc: markus.heidelberg, René Scharfe, git
In-Reply-To: <20081228090909.6117@nanako3.lavabit.com>

[-- Attachment #1: Type: text/plain, Size: 807 bytes --]

On Sun, Dec 28, 2008 at 09:09:09AM +0900, Nanako Shiraishi <nanako3@lavabit.com> wrote:
> 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.

Actually in that thread I asked if a patch that would make this
configurable would be ever accepted (so I would work on it), but I got
no answer. In the meantime I just learned to live with this, partially
because the vim highlight script highlights anything written to the
second line as red. ;-)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* Re: [PATCH] gitweb: Fix export check in git_get_projects_list
From: Jakub Narebski @ 2008-12-28  2:12 UTC (permalink / raw)
  To: Devin Doucette; +Cc: git, Petr Baudis
In-Reply-To: <a899d7ef0812270139u7dd28ee1q45a8c05f7c95db2f@mail.gmail.com>

On Sat, 27 Dec 2008, Devin Doucette wrote:

> When $filter was empty, the path passed to check_export_ok would
> contain an extra '/', which some implementations of export_auth_hook
> are sensitive to.
> 
> It makes more sense to fix this here than to handle the special case
> in each implementation of export_auth_hook.
> 
> Signed-off-by: Devin Doucette <devin@doucette.cc>

Good catch. Thanks.

Acked-by: Jakub Narebski <jnareb@gmail.com>

> ---
>  gitweb/gitweb.perl |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 8f574c7..99f71b4 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -2147,8 +2147,9 @@ sub git_get_projects_list {
> 
>  				my $subdir = substr($File::Find::name, $pfxlen + 1);
>  				# we check related file in $projectroot
> -				if (check_export_ok("$projectroot/$filter/$subdir")) {
> -					push @list, { path => ($filter ? "$filter/" : '') . $subdir };
> +				my $path = ($filter ? "$filter/" : '') . $subdir;

Nice and clear, but wouldn't be better to use slightly more effective

+				my $path = $filter ? "$filter/$subdir" : $subdir;

Or even, taking care of the case when $filter eq '0'

+				my $path = defined $filter && $filter ne '' ? "$filter/$subdir" : $subdir;

> +				if (check_export_ok("$projectroot/$path")) {
> +					push @list, { path => $path };
>  					$File::Find::prune = 1;
>  				}
>  			},
> -- 
> 1.6.1.rc4
> 

-- 
Jakub Narebski
Poland

^ permalink raw reply

* Re: [PATCH] Documentation/diff-options.txt: unify options
From: Junio C Hamano @ 2008-12-28  6:52 UTC (permalink / raw)
  To: jidanni; +Cc: git
In-Reply-To: <87lju1jmp9.fsf@jidanni.org>

jidanni@jidanni.org writes:

> 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.

Nonsense.

Here is a snippet from your patch.

        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".
        -

The only thing anybody can guess without looking at the original (that is
what "sending a patch without context" means) is that you moved "-u::" to
somewhere else, and stripped of its description.  There is absolutely no
clue to judge if the new home to "-u::" is an appropriate place.

In a normal patch with context, the same hunk would have looked like this:

        diff --git i/Documentation/diff-options.txt w/Documentation/diff-options.txt
        index c62b45c..c4ca0a9 100644
        --- i/Documentation/diff-options.txt
        +++ w/Documentation/diff-options.txt
        @@ -19,16 +19,12 @@ endif::git-format-patch[]

         ifndef::git-format-patch[]
         -p::
        +-u::
                Generate patch (see section on generating patches).
                {git-diff? This is the default.}
         endif::git-format-patch[]

        --u::
        -	Synonym for "-p".
        -
         -U<n>::
        -	Shorthand for "--unified=<n>".
        -
         --unified=<n>::

Presented this way, it is much more clear what is going on, as there is no
need to go back to the original and see if the new location for "-u::"
makes sense (and I think it does, but that is something I can say after
applying the patch and reviewing the result, because the patch itself is
not reviewable).

If you find yours just as easy to read as the one with context, your patch
reading ability far exceeds mine, and I'd refuse to read your patches in
the future to preserve my sanity.

There is another issue that should be obvious to people who deal with
patches every day.  The context-free patch you sent can be applied *ONLY*
after locating the *EXACT* preimage of the file you used to produce your
patch.  Before your patch is reviewed, other people may have already
modified the same file, perhaps introducing a few new lines at the top of
the file, and then what?  Your first hunk tells us that you would want to
insert a line with "-u::" at line #21, but the context does not match
anymore when your patch is reviewed.

^ permalink raw reply

* Re: [PATCH 2/2] grep: grep cache entries if they are "assume unchanged"
From: Junio C Hamano @ 2008-12-28  6:53 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>

Thanks.

^ permalink raw reply

* Re: [PATCH] gitweb: Fix export check in git_get_projects_list
From: Junio C Hamano @ 2008-12-28  6:54 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Devin Doucette, git, Petr Baudis
In-Reply-To: <200812280312.02615.jnareb@gmail.com>

Jakub Narebski <jnareb@gmail.com> writes:

> On Sat, 27 Dec 2008, Devin Doucette wrote:
>
>> When $filter was empty, the path passed to check_export_ok would
>> contain an extra '/', which some implementations of export_auth_hook
>> are sensitive to.
>> 
>> It makes more sense to fix this here than to handle the special case
>> in each implementation of export_auth_hook.
>> 
>> Signed-off-by: Devin Doucette <devin@doucette.cc>
>
> Good catch. Thanks.

Thanks, both.  Will queue for 'maint'.

^ permalink raw reply

* [PATCH] gitweb: Handle actions with no project in evaluate_path_info
From: Devin Doucette @ 2008-12-28  7:26 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski, Petr Baudis

The action would not be set if no valid project was found in
path_info. Removing the return if the project was not specified fixes
the project_index and opml actions when using path_info.

Signed-off-by: Devin Doucette <devin@doucette.cc>
---
 gitweb/gitweb.perl |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8f574c7..b6a8ea9 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -552,8 +552,7 @@ sub evaluate_path_info {
 	while ($project && !check_head_link("$projectroot/$project")) {
 		$project =~ s,/*[^/]*$,,;
 	}
-	return unless $project;
-	$input_params{'project'} = $project;
+	$input_params{'project'} = $project if $project;

 	# do not change any parameters if an action is given using the query string
 	return if $input_params{'action'};
-- 
1.6.1.rc4

^ permalink raw reply related

* user manual question
From: Zorba @ 2008-12-28 11:07 UTC (permalink / raw)
  To: git

Under "Examining an old version without creating a new branch" subsection in 
chapter1

to aid my understanding, could the statement:

"The HEAD then refers to the SHA1 of the commit instead of to a branch, and 
git branch shows that you are no longer on a branch:"

be restated more explicitly as:

"The HEAD then refers to the SHA1 of the commit instead of to a branch head, 
and git branch shows that you are no longer on a branch head:"

?

^ permalink raw reply

* [PATCH] gitk: try to provide a window icon
From: Giuseppe Bilotta @ 2008-12-28 11:28 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras, Junio C Hamano, Giuseppe Bilotta

Try to set up a 16x16 Tk photo image (based on the git logo) and use it
as window icon. Wrap the code in a catch because it may fail in earlier
Tcl/Tk 8.4 releases that don't provide 'wm iconphoto'.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---

Resend (with a typo fixed in the commit message), because it seems to
have flied a little too low on the previous round of commits.

 gitk-git/gitk |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index dc2a439..8c6a50d 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -10881,6 +10881,26 @@ set lserial 0
 set isworktree [expr {[exec git rev-parse --is-inside-work-tree] == "true"}]
 setcoords
 makewindow
+catch {
+	image create photo gitlogo      -width 16 -height 16
+
+	image create photo gitlogominus -width  4 -height  2
+	gitlogominus put #C00000 -to 0 0 4 2
+	gitlogo copy gitlogominus -to  1 5
+	gitlogo copy gitlogominus -to  6 5
+	gitlogo copy gitlogominus -to 11 5
+	image delete gitlogominus
+
+	image create photo gitlogoplus  -width  4 -height  4
+	gitlogoplus  put #008000 -to 1 0 3 4
+	gitlogoplus  put #008000 -to 0 1 4 3
+	gitlogo copy gitlogoplus  -to  1 9
+	gitlogo copy gitlogoplus  -to  6 9
+	gitlogo copy gitlogoplus  -to 11 9
+	image delete gitlogoplus
+
+	wm iconphoto . -default gitlogo
+}
 # wait for the window to become visible
 tkwait visibility .
 wm title . "[file tail $argv0]: [file tail [pwd]]"
-- 
1.5.6.5

^ permalink raw reply related

* Re: [PATCH] modify/delete conflict resolution overwrites untracked file
From: Clemens Buchacher @ 2008-12-28 11:44 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, johannes.schindelin, raa.lkml
In-Reply-To: <7vskopwxej.fsf@gitster.siamese.dyndns.org>

On Mon, Dec 15, 2008 at 02:22:28AM -0800, Junio C Hamano wrote:
> Clemens Buchacher <drizzd@aon.at> writes:
> > On Sun, Dec 14, 2008 at 07:34:46PM -0800, Junio C Hamano wrote:
> >> merge-recursive: do not clobber untracked working tree garbage
> >> 
> >> When merge-recursive wanted to create a new file in the work tree (either
> >> as the final result, or a hint for reference purposes while delete/modify
> >> conflicts), it unconditionally overwrote an untracked file in the working
> >> tree.  Be careful not to lose whatever the user has that is not tracked.
> >
> > This leaves the index in an unmerged state, however, so that a subsequent
> > git reset --hard still kills the file. And I just realized that the same
> > goes for merge-resolve. So I'd prefer to abort the merge, leave everything
> > unchanged and tell the user to clean up first.
> 
> That is unfortunately asking for a moon, I am afraid.
> 
> It needs a major restructuring of the code so that the recursive works
> more like the way resolve works, namely, changing the final "writeout"
> into two phase thing (the first phase making sure nothing is clobbered in
> the work tree, and then the second phase actually touching the work tree).

I've been giving this some thought and I would like to propose the following
solution:

1. Save index state.
2. Merge using whichever strategy, in index only, ignoring work tree.
   This step includes rename detection.
3. Check that work tree files match original index, if index does not match
   HEAD. Otherwise abort, restore index and leave everything unchanged.
4. Checkout index, overwriting work tree files, and removing files which are
   in HEAD, but not in the index.
5. If the merge was clean, commit.

AFAICS, this is largely the behavior right now, except that steps 3 and 4
are intermingled with step 2, which makes it impossible to abort the merge
if an untracked file is in the way after rename detection.

The idea at step 3 is that we can decide whether or not to proceed, based
only on the merge result, irrespective of the strategy used, possible rename
detection, or conflict resolution.

Apart from the fact that this seems like the sane thing to do, I want this
behavior because it allows me to do

git merge <branch>
# Conflicts? I don't have time for that now.
git reset --hard HEAD

under all circumstances, without touching any untracked files.

Do you agree that this is a desireable goal?

I have not looked into d/f conflicts, but I am under the impression that
this could also be handled at step 3, as far as the work tree is concerned.
Is the above proposal a workable approach, which I can pursue independently
of the major rewrite wrt. d/f conflicts Johannes indicated?

^ permalink raw reply

* Re: [PATCH 3/3] pretty: support multiline subjects with format:
From: Markus Heidelberg @ 2008-12-28 14:08 UTC (permalink / raw)
  To: Nanako Shiraishi; +Cc: René Scharfe, git
In-Reply-To: <20081228090909.6117@nanako3.lavabit.com>

Nanako Shiraishi, 28.12.2008:
> 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:

Many thanks for all the pointers. I thought there were reasons, but this
thread just made me ask.

Markus

^ permalink raw reply

* Re: [PATCH 3/3] pretty: support multiline subjects with format:
From: Markus Heidelberg @ 2008-12-28 14:16 UTC (permalink / raw)
  To: René Scharfe; +Cc: git
In-Reply-To: <4956C47B.4020602@lsrfire.ath.cx>

René Scharfe, 28.12.2008:
> Markus Heidelberg schrieb:
> >> 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.

Yes, now I think so, too. I had also noticed the unexpectedly different
behaviour once.

> If you actually like the old behaviour then perhaps a new placeholder
> (%S ?) should be introduced instead?

I don't need it. I rather asked regarding the old behaviour for oneline
and so, but reading that there are strong intentions for their
behaviour, it's fine.

Markus

^ permalink raw reply

* Re: [PATCH 3/3] pretty: support multiline subjects with format:
From: Markus Heidelberg @ 2008-12-28 14:26 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: René Scharfe, git
In-Reply-To: <7vr63tb1i2.fsf@gitster.siamese.dyndns.org>

Junio C Hamano, 28.12.2008:
> 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).

I don't call this lazy. Normally I look myself and don't want others to
spend time on searching for me. Reading that there already were
discussions about this and that the current behaviour is thoughtful is
enough for me to look for details myself. Thanks.

Markus

^ permalink raw reply

* Re: user manual question
From: Sitaram Chamarty @ 2008-12-28 14:38 UTC (permalink / raw)
  To: git
In-Reply-To: <gj7mmo$fvk$4@ger.gmane.org>

On 2008-12-28, Zorba <cr@altmore.co.uk> wrote:
> Under "Examining an old version without creating a new branch" subsection in 
> chapter1
>
> to aid my understanding, could the statement:
>
> "The HEAD then refers to the SHA1 of the commit instead of to a branch, and 
> git branch shows that you are no longer on a branch:"
>
> be restated more explicitly as:
>
> "The HEAD then refers to the SHA1 of the commit instead of to a branch head, 
> and git branch shows that you are no longer on a branch head:"

Sure, but I prefer "tip"; reduces confusion between "head"
and "HEAD" in spoken descriptions (I teach internal classes
on git occasionally, once even on a conf call!)

The git glossary makes no mention of "tip", so this is
probably "unblessed" :-)

^ permalink raw reply

* Re: user manual question
From: Dilip M @ 2008-12-28 16:36 UTC (permalink / raw)
  To: Sitaram Chamarty; +Cc: git
In-Reply-To: <slrnglf3qh.c7j.sitaramc@sitaramc.homelinux.net>

On Sun, Dec 28, 2008 at 8:08 PM, <sitaramc@gmail.com> wrote:
> On 2008-12-28, Zorba <cr@altmore.co.uk> wrote:
>> Under "Examining an old version without creating a new branch"
>> subsection in chapter1
>>
>> to aid my understanding, could the statement:
>>
>> "The HEAD then refers to the SHA1 of the commit instead of to a
>> branch, and git branch shows that you are no longer on a branch:"
>>
>> be restated more explicitly as:
>>
>> "The HEAD then refers to the SHA1 of the commit instead of to a
>> branch head, and git branch shows that you are no longer on a branch
>> head:"
>
> Sure, but I prefer "tip"; reduces confusion between "head" and "HEAD"
> in spoken descriptions (I teach internal classes on git occasionally,
> once even on a conf call!)

+1

I was (am) was initially confused about head and HEAD and assumed that
they are both same.

-- dm

^ permalink raw reply

* gitk Branch: field problem with 1.6.1
From: Hannu Koivisto @ 2008-12-28 16:53 UTC (permalink / raw)
  To: git

Greetings,

If I create a test repository as follows...

mkdir gitktest
cd gitktest
git init
echo foo > foo
git add foo
git commit -m "foo"
echo bar >> foo
git add foo
git commit -m "bar"
git checkout -b branch HEAD~1
echo baz > baz
git add baz
git commit -m "baz"
echo baz >> baz
git add baz
git commit -m "more baz"
git checkout -b debug2
echo baz >> baz
git add baz
git commit -m "even more baz"

...and with gitk --all look at the "more baz" commit, it says
"Branch: debug2" as shown here
<http://www.iki.fi/azure/tmp/gitk-test1.png>.  My understanding is
that it should show "Branches: branch, debug2" but I might be wrong
of course.

I have another test repository (I can make a creation recipe or
make the repository available for download if needed) where, in
addition to the problem above, gitk shows empty "Branch:" field for
the master branch's tip commit.

Both tests made with 1.6.1 on Linux.

-- 
Hannu

^ permalink raw reply

* Re: [PATCH] gitrepository-layout: No longer first two letters. Also add "down".
From: Sverre Rabbelier @ 2008-12-28 17:00 UTC (permalink / raw)
  To: Nanako Shiraishi; +Cc: jidanni, git
In-Reply-To: <20081227070232.6117@nanako3.lavabit.com>

On Fri, Dec 26, 2008 at 16:02, Nanako Shiraishi <nanako3@lavabit.com> wrote:
> Quoting jidanni@jidanni.org:
>
>> Signed-off-by: jidanni <jidanni@jidanni.org>
>
> Didn't you mean "Signed-off-by: 積丹尼 <jidanni@jidanni.org>"?

Be nice, they are obviously a bit peculiar about their name/sign-off name :).
-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox