git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] submodule update - don't run git-fetch if sha1 available

From
TSTorgil Svensson <torgil.svensson@gmail.com>
Date
Aug 19, 2007, 18:57 UTC
Message-ID
<e7bda7770708191157v54c2c2a3k8e17208a1d5b6dc9@mail.gmail.com>
In-Reply-To
<7vfy2plfb4.fsf@assigned-by-dhcp.cox.net>
On 8/12/07, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> unnecessary work), you may want to add a more lightweight
> built-in command to do so.  Perhaps...
>
> -- >8 --
> Subject: ls-tree --check
>
> You can run "ls-tree --check" to make sure that all necessary
> objects exist in the repository to complete a tree object.  This
> may be useful to make sure that the subproject commit bound to a
> superproject index can be checked out in its entirety.

This looks good, and the subproject part of it should be trivial to implement but i'm struggling with applying your patch.

If I copy the whole mail with headers (I get them with a menu item "show original" in gmail web client), paste it into a file ("*p in vim) I get the following:

$ git apply junio.mail Adds trailing whitespace. junio.mail:103:#define LS_CHECK 32 Adds trailing whitespace. junio.mail:112: "git-ls-tree [-d] [-r] [-t] [-l] [-z] [--check] [--name-only] [--name-status] [--full-name] [--abbrev[=<n>]] <tree-i sh> [path...]"; Adds trailing whitespace. junio.mail:120: } else if (ls_options & LS_CHECK) { Adds trailing whitespace. junio.mail:121: if (S_ISGITLINK(mode)) Adds trailing whitespace. junio.mail:122: /* error: patch failed: builtin-ls-tree.c:16 error: builtin-ls-tree.c: patch does not apply

git am gives me similar behaviour.
$ git am junio.mail
Applying submodule update - don't run git-fetch if sha1 available
Adds trailing whitespace.
.dotest/patch:14:#define LS_CHECK 32
Adds trailing whitespace.
.dotest/patch:23:       "git-ls-tree [-d] [-r] [-t] [-l] [-z]
[--check] [--name-only] [--name-status] [--full-name] [--abbrev[=<n>]]
 <tree-ish> [path...]";
Adds trailing whitespace.
.dotest/patch:31:               } else if (ls_options & LS_CHECK) {
Adds trailing whitespace.
.dotest/patch:32:                       if (S_ISGITLINK(mode))
Adds trailing whitespace.
.dotest/patch:33:                               /*
error: patch failed: builtin-ls-tree.c:16
error: builtin-ls-tree.c: patch does not apply
Patch failed at 0001.
When you have resolved this problem run "git-am --resolved".
If you would prefer to skip this patch, instead run "git-am --skip".
Is the "-- >8 --" -line something git-apply looks for?

Short of manual patching, abandoning the web-client or switch to another mail-account, is there any simple way to get around the above issues ? [I'm trying to do this on windows/msysgit]

Thank you for good support on this list!
//Torgil
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 7 in “submodule update - don't run git-fetch if sha1 available”
  1. submodule update - don't run git-fetch if sha1 availableTorgil Svensson, Aug 11, 2007
  2. Torgil SvenssonAug 11, 2007
  3. Junio C HamanoAug 11, 2007
  4. Torgil SvenssonAug 12, 2007
  5. Junio C HamanoAug 12, 2007
  6. Torgil SvenssonAug 19, 2007
  7. Junio C HamanoAug 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.