Re: git clone tag shallow

2013-02-17 Thread Duy Nguyen
On Mon, Feb 18, 2013 at 2:13 AM, Thibault Kruse wrote: > Hi all, > > I notice that using git 1.8.3, I can call > git clone repo1 repo2 --branch tagname > with a tag, not a branch. Is this going to be a stable and documented feature? There is a test for --branch=tag in t5601, so I say it's support

Please pull l10n updates for 1.8.2 round 2

2013-02-17 Thread Jiang Xin
Hi, Junio Please pull l10n updates for git 1.8.2 round 2. BTW, I find there are new updates in master branch and next branch: $ po-helper.sh check update New l10n updates found in "master" branch of remote "": 5 new messages. New l10n updates found in "next" branch of remote

Re: [PATCH v3 2/9] user-manual: Reorganize the reroll sections, adding 'git rebase -i'

2013-02-17 Thread Junio C Hamano
"W. Trevor King" writes: > On Sun, Feb 17, 2013 at 06:23:11PM -0800, Junio C Hamano wrote: >> "W. Trevor King" writes: >> > [[rewriting-one-commit]] >> > Rewriting a single commit >> > - >> > @@ -2552,71 +2558,81 @@ $ git commit --amend >> > which will replace the old

Re: [PATCH v3 2/9] user-manual: Reorganize the reroll sections, adding 'git rebase -i'

2013-02-17 Thread W. Trevor King
On Sun, Feb 17, 2013 at 06:23:11PM -0800, Junio C Hamano wrote: > "W. Trevor King" writes: > > [[rewriting-one-commit]] > > Rewriting a single commit > > - > > @@ -2552,71 +2558,81 @@ $ git commit --amend > > which will replace the old commit by a new commit incorporati

Re: [PATCH v3 9/9] user-manual: Use -o latest.tar.gz to create a gzipped tarball

2013-02-17 Thread Junio C Hamano
"W. Trevor King" writes: > From: "W. Trevor King" > > This functionality was introduced by 0e804e09 (archive: provide > builtin .tar.gz filter, 2011-07-21) for v1.7.7. > > Signed-off-by: W. Trevor King > --- This looks like a good 'maint' material that can be applied straight away there if the

Re: [PATCH v3 8/9] user-manual: Flesh out uncommitted changes and submodule updates

2013-02-17 Thread Junio C Hamano
"W. Trevor King" writes: > From: "W. Trevor King" > > If you try and update a submodule with a dirty working directory, you > get an error message like: > > $ git submodule update > error: Your local changes to the following files would be overwritten by > checkout: > ... > Please, comm

Re: [PATCH v3 7/9] user-manual: Use request-pull to generate "please pull" text

2013-02-17 Thread Junio C Hamano
"W. Trevor King" writes: > From: "W. Trevor King" > > Less work and more error checking (e.g. does a merge base exist?). > Add an explicit push before request-pull to satisfy request-pull, > which checks to make sure the references are publically available. > > Signed-off-by: W. Trevor King > -

Re: [PATCH v3 6/9] user-manual: Use 'git config --global user.*' for setup

2013-02-17 Thread Junio C Hamano
"W. Trevor King" writes: > From: "W. Trevor King" > > A simple command line call is easier than spawning an editor, > especially for folks new to ideas like the "command line" and "text > editors". This is also the approach suggested by 'git commit' if you > try and commit without having config

Re: [git] Re: [PATCH v3 4/9] user-manual: Mention 'git remote add' for remote branch config

2013-02-17 Thread W. Trevor King
On Sun, Feb 17, 2013 at 06:26:25PM -0800, Junio C Hamano wrote: > "W. Trevor King" writes: > > - > > +$ git fetch git://example.com/proj.git +refs/heads/*:refs/remotes/example/* > > +$ git fetch example +refs/heads/*:refs/remotes/example/* > > $ gi

Re: [PATCH v3 4/9] user-manual: Mention 'git remote add' for remote branch config

2013-02-17 Thread Junio C Hamano
"W. Trevor King" writes: > From: "W. Trevor King" > > I hardly ever setup remote..url using 'git config'. While it > may be instructive to do so, we should also point out 'git remote > add'. > > Signed-off-by: W. Trevor King > --- This looks like a good 'maint' material that can be applied st

Re: [PATCH v3 3/9] user-manual: Give 'git push -f' as an alternative to +master

2013-02-17 Thread Junio C Hamano
"W. Trevor King" writes: > From: "W. Trevor King" > > This mirrors existing language in the description of 'git fetch'. > > Signed-off-by: W. Trevor King > --- This looks like a good 'maint' material that can be applied straight away there in preparation for 1.8.1.4 to me; reviewers watching f

Re: [PATCH v3 2/9] user-manual: Reorganize the reroll sections, adding 'git rebase -i'

2013-02-17 Thread Junio C Hamano
"W. Trevor King" writes: > From: "W. Trevor King" > > I think this interface is often more convenient than extended cherry > picking or using 'git format-patch'. In fact, I removed the > cherry-pick section entirely. The entry-level suggestions for > rerolling are now: > > 1. git commit --amen

Re: [PATCH v3 1/9] user-manual: Use 'remote add' to setup push URLs

2013-02-17 Thread Jonathan Nieder
Junio C Hamano wrote: > "W. Trevor King" writes: >> There is no need to use here documents to setup this configuration. >> It is easier, less confusing, and more robust to use `git remote add` >> directly. [...] > This looks like a good 'maint' material that can be applied straight > away there i

Re: [PATCH v3 1/9] user-manual: Use 'remote add' to setup push URLs

2013-02-17 Thread Junio C Hamano
"W. Trevor King" writes: > From: "W. Trevor King" > > There is no need to use here documents to setup this configuration. > It is easier, less confusing, and more robust to use `git remote add` > directly. > > Signed-off-by: W. Trevor King > --- This looks like a good 'maint' material that can

Re: [PATCH 3/3] remote-curl: sanity check ref advertisement from server

2013-02-17 Thread Jonathan Nieder
Jeff King wrote: > On Sun, Feb 17, 2013 at 03:05:34AM -0800, Jonathan Nieder wrote: >> Jeff King wrote: >>> + if (verify_ref_advertisement(last->buf, last->len) < 0) >>> + die("ref advertisement is invalid at %s", refs_url); >> >> Won't this error out with >> >> pr

Re: [PATCH 2/3] remote-curl: verify smart-http metadata lines

2013-02-17 Thread Jonathan Nieder
Jeff King wrote: > On Sun, Feb 17, 2013 at 02:49:39AM -0800, Jonathan Nieder wrote: >> Jeff King wrote: >>> --- a/remote-curl.c [...] >>> + if (read_packets_until_flush(&last->buf, &last->len) < 0) >> >> Style nit: this made me wonder "What would it mean if >> read_packets_until_flush()

What's cooking in git.git (Feb 2013, #07; Sun, 17)

2013-02-17 Thread Junio C Hamano
What's cooking in git.git (Feb 2013, #07; Sun, 17) -- Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The tip of the 'master' is at 1.8.2-rc0;

[ANNOUNCE] Git v1.8.2-rc0

2013-02-17 Thread Junio C Hamano
An early preview Git v1.8.2-rc0 for the upcoming release is now available for testing at the usual places. The preview includes contributions from 80+ people, totaling some 570+ no-merge changes since v1.8.1 and should give you more or less a complete picture of what the upcoming 1.8.2 would look

Re: [PATCH 2/3] contrib/subtree/t: Added tests for .gitsubtree support

2013-02-17 Thread Jonathan Nieder
Paul Campbell wrote: > Here's the updated version of the tests: Just a few more nits: > --- a/contrib/subtree/t/t7900-subtree.sh > +++ b/contrib/subtree/t/t7900-subtree.sh > @@ -465,4 +465,37 @@ test_expect_success 'verify one file change per commit' ' [...] > +test_expect_success 'change in sub

[PATCH v3 8/9] user-manual: Flesh out uncommitted changes and submodule updates

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" If you try and update a submodule with a dirty working directory, you get an error message like: $ git submodule update error: Your local changes to the following files would be overwritten by checkout: ... Please, commit your changes or stash them before you can

[PATCH v3 9/9] user-manual: Use -o latest.tar.gz to create a gzipped tarball

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" This functionality was introduced by 0e804e09 (archive: provide builtin .tar.gz filter, 2011-07-21) for v1.7.7. Signed-off-by: W. Trevor King --- Documentation/user-manual.txt | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Documentat

[PATCH v3 6/9] user-manual: Use 'git config --global user.*' for setup

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" A simple command line call is easier than spawning an editor, especially for folks new to ideas like the "command line" and "text editors". This is also the approach suggested by 'git commit' if you try and commit without having configured user.name or user.email. Signed-

[PATCH v3 5/9] user-manual: Standardize backtick quoting

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" I tried to always use backticks for: * Paths and filenames (e.g. `.git/config`) * Compound refs (e.g. `origin/HEAD`) * Git commands (e.g. `git log`) * Command arguments (e.g. `--pretty`) * URLs (e.g. `git://`), as a subset of command arguments * Special characters (e.g. `+`

[PATCH v3 7/9] user-manual: Use request-pull to generate "please pull" text

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" Less work and more error checking (e.g. does a merge base exist?). Add an explicit push before request-pull to satisfy request-pull, which checks to make sure the references are publically available. Signed-off-by: W. Trevor King --- Documentation/user-manual.txt | 11 ++

[PATCH v3 3/9] user-manual: Give 'git push -f' as an alternative to +master

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" This mirrors existing language in the description of 'git fetch'. Signed-off-by: W. Trevor King --- Documentation/user-manual.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index dbffd0a..ba06b

[PATCH v3 2/9] user-manual: Reorganize the reroll sections, adding 'git rebase -i'

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" I think this interface is often more convenient than extended cherry picking or using 'git format-patch'. In fact, I removed the cherry-pick section entirely. The entry-level suggestions for rerolling are now: 1. git commit --amend 2. git format-patch origin git reset

[PATCH v3 4/9] user-manual: Mention 'git remote add' for remote branch config

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" I hardly ever setup remote..url using 'git config'. While it may be instructive to do so, we should also point out 'git remote add'. Signed-off-by: W. Trevor King --- Documentation/user-manual.txt | 40 +--- 1 file changed, 13 inserti

[PATCH v3 0/9] User manual updates

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" Changes since v2 (v2 numbering): * 01: user-manual: Rewrite git-gc section for automatic packing - Dropped (graduated to 'maint') * 02: user-manual: Update for receive.denyCurrentBranch=refuse - Dropped (graduated to 'master') * 03: user-manual: Use 'remote add' to set

[PATCH v3 1/9] user-manual: Use 'remote add' to setup push URLs

2013-02-17 Thread W. Trevor King
From: "W. Trevor King" There is no need to use here documents to setup this configuration. It is easier, less confusing, and more robust to use `git remote add` directly. Signed-off-by: W. Trevor King --- Documentation/user-manual.txt | 15 ++- 1 file changed, 10 insertions(+), 5 d

Re: [PATCH v2] read_directory: avoid invoking exclude machinery on tracked files

2013-02-17 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > If path_handled is returned, contents goes up. And if check_only is > true, the loop could be broken early. These will not happen when > treat_one_path (and its wrapper treat_path) returns > path_ignored. dir_add_name internally does a cache_name_exists() check > s

Re: [PATCH v4.1 09/12] sequencer.c: teach append_signoff to avoid adding a duplicate newline

2013-02-17 Thread John Keeping
On Fri, Feb 15, 2013 at 10:58:38AM -0800, Brandon Casey wrote: > On Thu, Feb 14, 2013 at 9:58 AM, John Keeping wrote: > > As Jonathan Nieder wondered before [1], this changes the behaviour when > > the commit message is empty. Before this commit, there is an empty line > > followed by the S-O-B l

Re: [PATCH v5] submodule: add 'deinit' command

2013-02-17 Thread Junio C Hamano
Jens Lehmann writes: > Here we go, changes to v4 are: > > - I decided to do the proposed special casing for "."; no messages > about uninitialized submodules will show up anymore (this is also > tested) > - The spelling fixes and better 'uninitialized' message Phil proposed > - Added the miss

[PATCH v5] submodule: add 'deinit' command

2013-02-17 Thread Jens Lehmann
With "git submodule init" the user is able to tell git he cares about one or more submodules and wants to have it populated on the next call to "git submodule update". But currently there is no easy way he could tell git he does not care about a submodule anymore and wants to get rid of his local w

Re: Git bundles for backup and cloning: the Zaphod Beeblebrox thread

2013-02-17 Thread Alain Kalker
On Sun, 17 Feb 2013 19:28:33 +, Alain Kalker wrote: > From the current documentation for git-bundle(1), it may not be clear > for users unfamilliar with Git, how to create a bundle which can be used > for backup purposes, or, more generally, to clone to a completely new > repository. > > Phil

Git bundles for backup and cloning: the Zaphod Beeblebrox thread

2013-02-17 Thread Alain Kalker
>From the current documentation for git-bundle(1), it may not be clear for users unfamilliar with Git, how to create a bundle which can be used for backup purposes, or, more generally, to clone to a completely new repository. Philip Oakley has posted a documentation patch some time ago, but Jun

Re: [PATCH 3/3] remote-curl: sanity check ref advertisement from server

2013-02-17 Thread Jeff King
On Sun, Feb 17, 2013 at 03:05:34AM -0800, Jonathan Nieder wrote: > Jeff King wrote: > > > If the smart HTTP response from the server is truncated for > > any reason, we will get an incomplete ref advertisement. If > > we then feed this incomplete list to "fetch-pack", one of a > > few things may

Re: [PATCH 2/3] remote-curl: verify smart-http metadata lines

2013-02-17 Thread Jeff King
On Sun, Feb 17, 2013 at 02:49:39AM -0800, Jonathan Nieder wrote: > Jeff King wrote: > > > --- a/remote-curl.c > > +++ b/remote-curl.c > [...] > > @@ -155,11 +166,13 @@ static struct discovery* discover_refs(const char > > *service) > [...] > > - strbuf_reset(&buffer); > > - w

git clone tag shallow

2013-02-17 Thread Thibault Kruse
Hi all, I notice that using git 1.8.3, I can call git clone repo1 repo2 --branch tagname with a tag, not a branch. Is this going to be a stable and documented feature? cheers, Thibault -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.k

Fwd: git clone combined with --depth, --branch and --single-branch

2013-02-17 Thread Thibault Kruse
Actually, using git 1.8.3, I get: git clone repo1 repo2 --depth 1 warning: --depth is ignored in local clones; use file:// instead. ... So I guess the warning says it all, it helps to read it. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@

Re: [BUG] Git clone of a bundle fails, but works (somewhat) when run with strace

2013-02-17 Thread Philip Oakley
From: "Alain Kalker" Sent: Sunday, February 17, 2013 1:01 PM On Fri, 15 Feb 2013 23:01:09 -0500, Jeff King wrote: On Sat, Feb 16, 2013 at 12:03:58AM +, Alain Kalker wrote: ---test.sh--- #!/bin/sh [...] but that warning makes sense. You did not create a bundle that contains HEAD, ther

Re: git clone combined with --depth, --branch and --single-branch

2013-02-17 Thread Thibault Kruse
Hi Duy, On Sun, Feb 17, 2013 at 3:32 PM, Duy Nguyen wrote: > On Sun, Feb 17, 2013 at 7:29 PM, Thibault Kruse > wrote: >> git log --pretty=format:'%h-%s %d' --graph --decorate --all >> * 4565162-5 (foo) >> * 20ce846-4 >> * a0615eb-3 >> * fa4131d-2 >> * f0683bd-1 (bar) >> | * 432b5ec-m1 (HEAD,

Re: [git] Re: [PATCH v2 02/15] user-manual: Update for receive.denyCurrentBranch=refuse

2013-02-17 Thread W. Trevor King
On Thu, Feb 14, 2013 at 10:57:21AM -0800, Junio C Hamano wrote: > So let's tone everything down and do this instead: > > -- >8 -- > From: "W. Trevor King" > Date: Fri, 8 Feb 2013 12:04:20 -0500 > Subject: [PATCH] user-manual: Update for receive.denyCurrentBranch=refuse > > acd2a45 (Refuse updati

Re: [PATCH v2] read_directory: avoid invoking exclude machinery on tracked files

2013-02-17 Thread Pete Wyckoff
pclo...@gmail.com wrote on Sun, 17 Feb 2013 11:39 +0700: > On Sun, Feb 17, 2013 at 1:11 AM, Pete Wyckoff wrote: > > pclo...@gmail.com wrote on Sat, 16 Feb 2013 14:17 +0700: > >> Finally some numbers (best of 20 runs) that shows why it's worth all > >> the hassle: > >> > >> git status | webkit li

Re: [PATCH 2/3] contrib/subtree/t: Added tests for .gitsubtree support

2013-02-17 Thread Paul Campbell
On Sun, Feb 17, 2013 at 11:37 AM, Jonathan Nieder wrote: > Paul Campbell wrote: > >> Is there was a better way to verify that the push operation succeeds >> then grepping for a SHA1? > > IIRC then when a push fails, it will exit with nonzero status (so the > usual &&-chaining would propagate the e

Re: git clone combined with --depth, --branch and --single-branch

2013-02-17 Thread Duy Nguyen
On Sun, Feb 17, 2013 at 7:29 PM, Thibault Kruse wrote: > git log --pretty=format:'%h-%s %d' --graph --decorate --all > * 4565162-5 (foo) > * 20ce846-4 > * a0615eb-3 > * fa4131d-2 > * f0683bd-1 (bar) > | * 432b5ec-m1 (HEAD, master) > |/ > * 39df203-0 > > git clone repo1 repo2 --depth 1 > cd rep

Re: Anybody know a website with up-to-date git documentation?

2013-02-17 Thread Drew Northup
On Wed, Jan 30, 2013 at 6:07 PM, Sitaram Chamarty wrote: > On Wed, Jan 30, 2013 at 09:18:24AM -0800, Junio C Hamano wrote: >> Max Horn writes: >> > On 30.01.2013, at 16:59, Sitaram Chamarty wrote: >> > >> >> I'm curious... what's wrong with 'git checkout html' from the git repo >> >> and just bro

Re: [BUG] Git clone of a bundle fails, but works (somewhat) when run with strace

2013-02-17 Thread Alain Kalker
On Fri, 15 Feb 2013 23:01:09 -0500, Jeff King wrote: > On Sat, Feb 16, 2013 at 12:03:58AM +, Alain Kalker wrote: > >> ---test.sh--- >> #!/bin/sh >> >> make clean make || return 125 GIT=$(pwd)/git >> >> cd /tmp rm -rf testrepo mkdir testrepo cd testrepo $GIT init echo test >> > test.txt $GIT

git clone combined with --depth, --branch and --single-branch

2013-02-17 Thread Thibault Kruse
Hi all, Using git 1.7.10.4 I find the behavior or documentation of "git clone --single-branch" confusing. Docs currently say: man git-clone --single-branch Clone only the history leading to the tip of a single branch, either specified by the --branch option or the primary bra

Re: [PATCH 2/3] contrib/subtree/t: Added tests for .gitsubtree support

2013-02-17 Thread Jonathan Nieder
Paul Campbell wrote: > Is there was a better way to verify that the push operation succeeds > then grepping for a SHA1? IIRC then when a push fails, it will exit with nonzero status (so the usual &&-chaining would propagate the error). Alternatively, one can fetch, ls-remote, or enter the target

Re: [PATCH 4/4] t7800: "defaults" is no longer a builtin tool name

2013-02-17 Thread Jonathan Nieder
David Aguilar wrote: > t7800 tests that configured commands can override builtins, > but this test was not adjusted when the "defaults" file was > removed because the test continued to pass. > > Adjust the test to use the everlasting "vimdiff" Heh. :) >

Re: [PATCH 3/4] t7800: modernize tests

2013-02-17 Thread Jonathan Nieder
David Aguilar wrote: > --- a/t/t7800-difftool.sh > +++ b/t/t7800-difftool.sh > @@ -10,29 +10,11 @@ Testing basic diff tool invocation [...] > -restore_test_defaults() > -{ > - # Restores the test defaults used by several tests > - remove_config_vars > - unset GIT_DIFF_TOOL > - unse

Re: [PATCH 3/3] remote-curl: sanity check ref advertisement from server

2013-02-17 Thread Jonathan Nieder
Jeff King wrote: > If the smart HTTP response from the server is truncated for > any reason, we will get an incomplete ref advertisement. If > we then feed this incomplete list to "fetch-pack", one of a > few things may happen: > > 1. If the truncation is in a packet header, fetch-pack > wi

Re: [PATCH 2/3] remote-curl: verify smart-http metadata lines

2013-02-17 Thread Jonathan Nieder
Jeff King wrote: > --- a/remote-curl.c > +++ b/remote-curl.c [...] > @@ -155,11 +166,13 @@ static struct discovery* discover_refs(const char > *service) [...] > - strbuf_reset(&buffer); > - while (packet_get_line(&buffer, &last->buf, &last->len) > 0) > -

Re: [PATCH 1/3] pkt-line: teach packet_get_line a no-op mode

2013-02-17 Thread Jonathan Nieder
Jeff King wrote: > --- a/pkt-line.c > +++ b/pkt-line.c > @@ -234,9 +234,10 @@ int packet_get_line(struct strbuf *out, > *src_len -= 4; > len -= 4; > > - strbuf_add(out, *src_buf, len); > + if (out) > + strbuf_add(out, *src_buf, len); > + packet_trace(*src_buf,

Re: rev-parse fails on objects that contain colon

2013-02-17 Thread Orgad Shaneh
On Sun, Feb 17, 2013 at 10:37 AM, Orgad Shaneh wrote: > $ git stash save foo:bar > HEAD is now at 9f88dce Foo > $ git stash pop foo:bar > fatal: Invalid object name 'foo'. > $ git rev-parse foo:bar > foo:bar > fatal: Invalid object name 'foo'. > > Tested on Windows (msysGit) and Linux. > > - Orgad