Re: [PATCH/RFCv2 2/2] git rebase -i: warn about removed commits

2015-06-01 Thread Matthieu Moy
Galan Rémi writes: > Check if commits were removed (i.e. a line was deleted) and print > warnings or abort git rebase according to the value of the > configuration variable rebase.checkLevel. checkLevel does not seem to be a good name, because it doesn't say _what_ is checked. I don't have reall

git torrent - sane deterministic pack files

2015-06-01 Thread Zenaan Harkness
Please CC me when replying, if you think of it. Thanks. LWN discussion, this particular thread starts here: https://lwn.net/Articles/646758/ Some extracts: Deterministic packfile creation is required for parallel git downloads. Example git pack file parameter/ configuration variations: - compres

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Greg KH
On Mon, Jun 01, 2015 at 01:23:26PM -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > > s/enw/new/ > > Heh, thanks; I wasn't planning to commit this one yet, but why not. Well, it's not good to apply a commit with no actual commit. That never a good thing, and was the thing that really c

Re: git-repack keeps running out of memory

2015-06-01 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 06/01/2015 04:58 PM, Jeff King wrote: > How many processors do you have? The window-memory is per-thread. > Try with --threads=1. Ahh, right... 8... that explains it ;) -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEcBAEBCgAGBQJVbPMBAAoJEN

[RFCv2 12/16] transport: get_refs_via_connect exchanges capabilities before refs.

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Notes: A minor issue I am unsure about here is the line && transport->smart_options->transport_version) which could be prevented if we always set the transport_version in make_remote to be the default remote version. The advantage

[RFCv2 09/16] remote.h: add get_remote_capabilities, request_capabilities

2015-06-01 Thread Stefan Beller
Instead of calling get_remote_heads as a first command during the protocol exchange, we need to have fine grained control over the capability negotiation in version 2 of the protocol. Introduce get_remote_capabilities, which will just listen to capabilities of the remote and request_capabilities w

[RFCv2 15/16] Documentation/technical/pack-protocol: Mention http as possible protocol

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- This may go unrelated to this series as well. Documentation/technical/pack-protocol.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt index fc09c63

[RFCv2 03/16] connect: rewrite feature parsing to work on string_list

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/receive-pack.c | 13 + connect.c | 79 ++ connect.h | 2 +- upload-pack.c | 11 +-- 4 files changed, 51 insertions(+), 54 deletions(-) diff --git a/builtin/rec

[RFCv2 06/16] remote.h: add new struct for options

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- remote.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/remote.h b/remote.h index d5242b0..16cacfe 100644 --- a/remote.h +++ b/remote.h @@ -56,6 +56,20 @@ struct remote { char *http_proxy; }; +/* todo: discuss if this should be merg

[RFCv2 08/16] transport: select transport version via command line or config

2015-06-01 Thread Stefan Beller
The transport version set via command line argument in git fetch takes precedence over the configured version. Signed-off-by: Stefan Beller --- Notes: removed -y as the short --transport-version This patch has been split up and is the second part carrying only the exposure to th

[RFCv2 07/16] transport: add infrastructure to support a protocol version number

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Notes: This patch has been split up into 2 parts. This first part only introduces the infrastructure without exposing it to the user at all (no command line option nor a repository configuration option). The exposure to the user will be ad

[RFCv2 10/16] transport: connect_setup appends protocol version number

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Notes: name it to_free transport.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/transport.c b/transport.c index 651f0ac..b49fc60 100644 --- a/transport.c +++ b/transport.c @@ -496,15 +496,28 @@ static int set_git_opt

[RFCv2 02/16] upload-pack: make client capability parsing code a separate function

2015-06-01 Thread Stefan Beller
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Stefan Beller --- upload-pack.c | 44 +++- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index 745fda8..5449ff7 100644 --- a/upl

[RFCv2 11/16] remote: have preselect_capabilities

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- connect.c | 28 remote.h | 1 + 2 files changed, 29 insertions(+) diff --git a/connect.c b/connect.c index 4ebe1dc..752b9a5 100644 --- a/connect.c +++ b/connect.c @@ -126,6 +126,34 @@ void get_remote_capabilities(int in, char *src_b

[RFCv2 13/16] fetch-pack: use the configured transport protocol

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/fetch-pack.c | 22 ++- fetch-pack.c | 109 +++ fetch-pack.h | 1 + 3 files changed, 80 insertions(+), 52 deletions(-) diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index

[RFCv2 16/16] Document protocol version 2

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Documentation/technical/pack-protocol.txt | 79 +-- Documentation/technical/protocol-capabilities.txt | 15 - 2 files changed, 74 insertions(+), 20 deletions(-) diff --git a/Documentation/technical/pack-protocol.txt b/Documentatio

[RFCv2 14/16] t5544: add a test case for the new protocol

2015-06-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/t5544-fetch-2.sh | 40 1 file changed, 40 insertions(+) create mode 100755 t/t5544-fetch-2.sh diff --git a/t/t5544-fetch-2.sh b/t/t5544-fetch-2.sh new file mode 100755 index 000..beee46c --- /dev/null +++ b/t/t5544-

[RFCv2 05/16] remote.h: Change get_remote_heads return to void

2015-06-01 Thread Stefan Beller
No function uses the return value of get_remote_heads, so we don't want to confuse readers by it. Signed-off-by: Stefan Beller --- connect.c | 10 -- remote.h | 8 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/connect.c b/connect.c index 4295ba1..a2c777e 1006

[RFCv2 04/16] upload-pack-2: Implement the version 2 of upload-pack

2015-06-01 Thread Stefan Beller
In upload-pack-2 we send each capability in its own packet buffer. Signed-off-by: Stefan Beller --- Notes: Moved the capabilities into a struct containing all the capabilities, and then we selectively cancel out unwanted capabilities. .gitignore | 1 + Makefile| 2 ++

[RFCv2 00/16] Protocol version 2

2015-06-01 Thread Stefan Beller
patches 1-4 are for the uploading side (upload-pack) and 5-13 for the fetching side. patches 14-16 are documentation and the tiny test. Nguyễn Thái Ngọc Duy (1): upload-pack: make client capability parsing code a separate function Stefan Beller (15): stringlist: add from_space_separated_stri

[RFCv2 01/16] stringlist: add from_space_separated_string

2015-06-01 Thread Stefan Beller
This function parses a space separated string into a string list. Signed-off-by: Stefan Beller --- string-list.c | 12 string-list.h | 1 + 2 files changed, 13 insertions(+) diff --git a/string-list.c b/string-list.c index 2a32a3f..f71384f 100644 --- a/string-list.c +++ b/string-l

Re: [RFC/WIP PATCH 11/11] Document protocol version 2

2015-06-01 Thread Stefan Beller
On Mon, Jun 1, 2015 at 4:14 PM, Stefan Beller wrote: > On Fri, May 29, 2015 at 3:21 PM, Jeff King wrote: >> On Fri, May 29, 2015 at 02:52:14PM -0700, Junio C Hamano wrote: >> >>> > Currently we can do a = as part of the line after the first ref, such as >>> > >>> > symref=HEAD:refs/heads/mast

Re: [PATCH/RFCv2 2/2] git rebase -i: warn about removed commits

2015-06-01 Thread Eric Sunshine
On Mon, Jun 1, 2015 at 7:16 PM, Eric Sunshine wrote: > On Mon, Jun 1, 2015 at 7:52 AM, Galan Rémi > wrote: >> test_expect_success 'drop' ' >> - git checkout master && >> test_when_finished "git checkout master" && >> git checkout -b dropBranchTest master && > > This "cleanu

Re: [PATCH/RFCv2 2/2] git rebase -i: warn about removed commits

2015-06-01 Thread Eric Sunshine
On Mon, Jun 1, 2015 at 7:52 AM, Galan Rémi wrote: > Check if commits were removed (i.e. a line was deleted) and print > warnings or abort git rebase according to the value of the > configuration variable rebase.checkLevel. > > Add the configuration variable rebase.checkLevel. > - When unset or

Re: [RFC/WIP PATCH 11/11] Document protocol version 2

2015-06-01 Thread Stefan Beller
On Fri, May 29, 2015 at 3:21 PM, Jeff King wrote: > On Fri, May 29, 2015 at 02:52:14PM -0700, Junio C Hamano wrote: > >> > Currently we can do a = as part of the line after the first ref, such as >> > >> > symref=HEAD:refs/heads/master agent=git/2:2.4.0 >> > >> > so I thought we want to keep t

Re: [RFC/PATCH 2/2] messages: uniform error messages for index write

2015-06-01 Thread Junio C Hamano
Michael J Gruber writes: > * Leave "temporary" in place and add TRANSLATORS note. > It may happen that the index file is writable but not the temporary > one. > > * Leave pack-write.c alone. > It is low level without l10n. > > Signed-off-by: Michael J Gruber > --- > I am actually a bit tor

Re: [PATCH] format-patch: dereference tags with --ignore-if-in-upstream

2015-06-01 Thread Junio C Hamano
"brian m. carlson" writes: >> In the longer term, it might be a more correct fix to teach >> clear_commit_marks() to do the same "committish to commit" >> dereferncing that is done in the revision traversal machinery, but > > "dereferencing". Otherwise, looks exactly like what I would have > wri

Re: [PATCH 1/9] send-email: further document missing sendmail aliases functionality

2015-06-01 Thread Allen Hubbe
This looks good. On Mon, Jun 1, 2015 at 2:22 PM, Eric Sunshine wrote: > On Mon, Jun 01, 2015 at 07:43:08AM -0400, Allen Hubbe wrote: >> On May 31, 2015 at 6:29 PM, Eric Sunshine wrote: >> > Sendmail aliases[1] supports expansion to a file ("/path/name") or >> > pipe ("|command"), as well as file

Re: [PATCH] format-patch: dereference tags with --ignore-if-in-upstream

2015-06-01 Thread brian m. carlson
On Mon, Jun 01, 2015 at 01:35:17PM -0700, Junio C Hamano wrote: > -- >8 -- > From: Junio C Hamano > Date: Mon, 1 Jun 2015 10:44:21 -0700 > Subject: [PATCH] format-patch: do not feed tags to clear_commit_marks() > > "git format-patch --ignore-if-in-upstream A..B", when either A or B > is a tag, fa

Re: [PATCH 1/2] rebase -i: demonstrate incorrect behavior of post-rewrite

2015-06-01 Thread Roberto Tyley
On 22 May 2015 at 16:59, Junio C Hamano wrote: > Roberto, isn't your threading of multi-patch series busted? > > Why is 1/2 a follow-up to 2/2? Do you have a time-machine ;-)? Oh, embarrassing, I better destroy the time-machine: https://github.com/rtyley/submitgit/pull/5 This was due to me not

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Remi Lespinet
Ok, Thanks for all the informations > Notice that the pre-context lines in this second example is only one > line. Is it giving the same degree of safety if we rejected an > attempt to apply this patch only when the original does not have 10, > 20, 30 and 40 in this order? > > No. Because we ar

[PATCH] receive-pack: Create a HEAD ref for ref namespace

2015-06-01 Thread Johannes Löthberg
Each ref namespace have their own separate branches, tags, and HEAD, so when pushing to a namespace we need to make sure that there exists a HEAD ref for the namespace, otherwise you will not be able to check out the repo after cloning from a namespace --- So, I have absolutely no clue where this

Re: git-repack keeps running out of memory

2015-06-01 Thread Jeff King
On Mon, Jun 01, 2015 at 03:07:16PM -0400, Phil Susi wrote: > It's more the --window-memory argument that is important here: it is > supposed to prevent exactly this problem. I guess I tried adding the > --max-pack-size as well on the off chance that it would help. How many processors do you have

Re: [PATCH] format-patch: dereference tags with --ignore-if-in-upstream

2015-06-01 Thread Junio C Hamano
Jeff King writes: > On Mon, Jun 01, 2015 at 10:44:21AM -0700, Junio C Hamano wrote: > >> > Shouldn't you ensure o1 and o2 are commits here? >> >> Heh, I should have read the remainder of the thread before >> responding. >> >> How about doing it this way? We know and trust that existing >> revi

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Junio C Hamano
Eric Sunshine writes: > s/enw/new/ Heh, thanks; I wasn't planning to commit this one yet, but why not. Here is with an updated log message and a test. -- >8 -- Subject: [PATCH] apply: reject a hunk that does not do anything A hunk like this in a hand-edited patch without correctly adjusting th

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Eric Sunshine
On Mon, Jun 1, 2015 at 2:58 PM, Junio C Hamano wrote: > Subject: apply: reject a hunk that does not do anything > > A hunk like this in a hand-edited patch without correctly adjusting > the line counts: > > @@ -660,2 +660,2 @@ inline struct sk_buff *ieee80211_authentic... > auth

Re: [PATCH] l10n: de.po: translate "index" as "Index"

2015-06-01 Thread Christian Stimming
Am Montag, 1. Juni 2015, 12:34:31 schrieb Stefan Beller: > On Mon, Jun 1, 2015 at 12:26 PM, Christian Stimming wrote: > > "index" concept, my explanation routinely says "This concept is called > > 'index' but it has nothing to do with any associations you make with that > > word. Better remember

Re: Staging commits with visual diff tools?

2015-06-01 Thread John Lee
On Sun, 31 May 2015, David Aguilar wrote: Were you thinking of something like this, or something else? Can you describe your use case a bit more? I think now I should just publish my script and then it will be very clear what I'm talking about. If somebody then wants to add a similar feature

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-06-01 Thread Karthik Nayak
On June 1, 2015 8:23:51 PM GMT+05:30, Junio C Hamano wrote: >Karthik Nayak writes: > >> Could be achieved using a simple wrapper around 'filter_refs()' >> something like this perhaps. >> >> int filter_refs_with_pattern(struct ref_array *ref, int >> (*for_each_ref_fn)(each_ref_fn, void *), char

Re: [PATCH] l10n: de.po: translate "index" as "Index"

2015-06-01 Thread Christian Stimming
Am Montag, 1. Juni 2015, 09:38:37 schrieb g...@drmicha.warpmail.net: > Ralf Thielow venit, vidit, dixit 29.05.2015 20:54: > > The term "index" is translated as "Staging-Area" to > > not confuse beginners who don't know about Git's index. > > > > Since the term "staging area" doesn't appear in orig

Re: [PATCH] l10n: de.po: translate "index" as "Index"

2015-06-01 Thread Stefan Beller
On Mon, Jun 1, 2015 at 12:26 PM, Christian Stimming wrote: > "index" concept, my explanation routinely says "This concept is called 'index' > but it has nothing to do with any associations you make with that word. Better > remember this thingy as *** and replace the termin 'index' with *** every t

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-06-01 Thread Karthik Nayak
On June 1, 2015 12:08:57 PM GMT+05:30, Matthieu Moy wrote: >Christian Couder writes: > >> sort_refs() -> ref_array_sort() >> struct ref_sort -> struct ref_sort_criteria >> default_sort() -> ref_default_sort_criteria() >> opt_parse_sort() -> opt_parse_ref_sort_criteria() > >BTW, having such sum

Re: git-repack keeps running out of memory

2015-06-01 Thread Phil Susi
On 6/1/2015 2:43 PM, Junio C Hamano wrote: Phil Susi writes: I keep having git-repack run out of virtual memory ( 32 bit system ) when trying to repack my linux kernel repo. It keeps making it right up to 99% then barfing saying mmap failed: Cannot allocate memory. I thought I could help thi

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Junio C Hamano
Junio C Hamano writes: > It claims that it has only 2 lines in the hunk, so "git apply" > parses the hunk that begins at line 660 as such: > > @@ -660,2 +660,2 @@ inline struct sk_buff *ieee80211_authentic... > auth = (struct ieee80211_authentication *) > skb_p

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Junio C Hamano
Matthieu Moy writes: >> I am not sure what you are trying to do with that patch that tries >> to touch the same line twice. Is this the same old laziness coming >> back to bite us, the one that we attempted to work around with >> 933e44d3 ("add -p": work-around an old laziness that does not >> c

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >>> @@ -1,1 +1,2 @@ >>> +5 >>> 10 >>> @@ -1,3 +2,3 @@ >>> 10 >>> +15 >>> -20 >>> 30 >> >> With this one, I get: >> >> $ git apply < p2.diff >> error: patch failed: pre.txt:1 >> error: pre.txt: patch does not apply >> $ patch < p2.diff >> pat

Re: git-repack keeps running out of memory

2015-06-01 Thread Junio C Hamano
Phil Susi writes: > I keep having git-repack run out of virtual memory ( 32 bit system ) > when trying to repack my linux kernel repo. It keeps making it right > up to 99% then barfing saying mmap failed: Cannot allocate memory. > > I thought I could help this by limiting the pack size, and usin

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Junio C Hamano
Matthieu Moy writes: >> @@ -1,1 +1,2 @@ >> +5 >> 10 >> @@ -1,3 +2,3 @@ >> 10 >> +15 >> -20 >> 30 > > With this one, I get: > > $ git apply < p2.diff > error: patch failed: pre.txt:1 > error: pre.txt: patch does not apply > $ patch < p2.diff > patching file pre.txt > > => no fuzzy matching

git-repack keeps running out of memory

2015-06-01 Thread Phil Susi
I keep having git-repack run out of virtual memory ( 32 bit system ) when trying to repack my linux kernel repo. It keeps making it right up to 99% then barfing saying mmap failed: Cannot allocate memory. I thought I could help this by limiting the pack size, and using --window-memory to limi

Re: [PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit

2015-06-01 Thread Matthieu Moy
Remi Galan Alfonso writes: > Junio C Hamano writes: >> Is this sufficient? > >> If you are going to do something in 2/2 that relies on the format of >> this line being correct (as opposed to "noop" or "#" that can have >> any garbage on the remainder of the line), wouldn't you want to at >> leas

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Junio C Hamano
Greg KH writes: > But, there's nothing in the patch at all except the commit message: > > $ git show HEAD > ... > Any ideas what is going on here? Shouldn't 'git am' have failed? Yes. The patch reads like this: --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 5 +++--

Re: [PATCH 1/9] send-email: further document missing sendmail aliases functionality

2015-06-01 Thread Eric Sunshine
On Mon, Jun 01, 2015 at 07:43:08AM -0400, Allen Hubbe wrote: > On May 31, 2015 at 6:29 PM, Eric Sunshine wrote: > > Sendmail aliases[1] supports expansion to a file ("/path/name") or > > pipe ("|command"), as well as file inclusion (":include: /path/name"), > > however, our implementation does not

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Matthieu Moy
Remi LESPINET writes: > == > = 2. Correction > == > > I see mainly two ways to fix the bug: > > *

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Matthieu Moy
Junio C Hamano writes: > Remi LESPINET writes: > >> first original file: >> >> 10 >> 20 >> 30 >> 40 >> >> for the following diff file: >> >> @@ -1,2 +1,2 @@ >> 20 >> -30 >> +35 >> 40 >> >> The patch will not be applied with a git apply command, but it will >> with a basic patch command. > > Do

Re: [PATCH] format-patch: dereference tags with --ignore-if-in-upstream

2015-06-01 Thread Junio C Hamano
Junio C Hamano writes: > How about doing it this way? We know and trust that existing > revision traversal machinery is doing the right thing, and it is > only that the clear_commit_marks() calls are botched. Another alternative may be to allow any object to clear_commit_marks() and have the ca

Re: [RFC/WIP PATCH 00/11] Protocol version 2, again!

2015-06-01 Thread Stefan Beller
On Wed, May 27, 2015 at 12:08 AM, Jeff King wrote: > On Wed, May 27, 2015 at 02:18:18AM -0400, Jeff King wrote: > >> > The new protocol works just like the old protocol, except for >> > the capabilities negotiation being before any exchange of real data. >> >> I like this approach. [...] > > So no

Re: [PATCH] format-patch: dereference tags with --ignore-if-in-upstream

2015-06-01 Thread Jeff King
On Mon, Jun 01, 2015 at 10:44:21AM -0700, Junio C Hamano wrote: > > Shouldn't you ensure o1 and o2 are commits here? > > Heh, I should have read the remainder of the thread before > responding. > > How about doing it this way? We know and trust that existing > revision traversal machinery is do

Re: [PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit

2015-06-01 Thread Remi Galan Alfonso
Junio C Hamano writes: > Is this sufficient? > If you are going to do something in 2/2 that relies on the format of > this line being correct (as opposed to "noop" or "#" that can have > any garbage on the remainder of the line), wouldn't you want to at > least check $sha1 is sensible? That's al

Re: [PATCH] format-patch: dereference tags with --ignore-if-in-upstream

2015-06-01 Thread Junio C Hamano
Junio C Hamano writes: > "brian m. carlson" writes: > >> diff --git a/builtin/log.c b/builtin/log.c >> index dd8f3fc..e0465ba 100644 >> --- a/builtin/log.c >> +++ b/builtin/log.c >> @@ -807,6 +807,12 @@ static void get_patch_ids(struct rev_info *rev, >> struct patch_ids *ids) >> o2 = rev->p

Re: Git-Win: case insensitive names

2015-06-01 Thread Konstantin Khomoutov
On Mon, 1 Jun 2015 13:30:19 -0400 Vadim Kramer wrote: > Just had to deal with a nasty cross-UNIX/Windows problem. > > Two files in the repository were in the same direcory and had the same > name differing only by the case of some of the letters. While > checking them out, git wantonly confused

Re: [PATCH 1/3] t6301: new tests of for-each-ref error handling

2015-06-01 Thread Junio C Hamano
Jeff King writes: > On Mon, Jun 01, 2015 at 05:53:49PM +0200, Michael Haggerty wrote: > >> Add tests that for-each-ref correctly reports broken loose reference >> files and references that point at missing objects. In fact, two of >> these tests fail, because (1) NULL_SHA1 is not recognized as an

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Junio C Hamano
Junio C Hamano writes: > Remi LESPINET writes: > >> first original file: >> >> 10 >> 20 >> 30 >> 40 >> >> for the following diff file: >> >> @@ -1,2 +1,2 @@ >> 20 >> -30 >> +35 >> 40 >> >> The patch will not be applied with a git apply command, but it will >> with a basic patch command. > > Do

Git-Win: case insensitive names

2015-06-01 Thread Vadim Kramer
Hi, Just had to deal with a nasty cross-UNIX/Windows problem. Two files in the repository were in the same direcory and had the same name differing only by the case of some of the letters. While checking them out, git wantonly confused them (conflated them into one) and got confused about them.

Re: [RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Junio C Hamano
Remi LESPINET writes: > first original file: > > 10 > 20 > 30 > 40 > > for the following diff file: > > @@ -1,2 +1,2 @@ > 20 > -30 > +35 > 40 > > The patch will not be applied with a git apply command, but it will > with a basic patch command. Doesn't that merely indicate a bug in "patch", tho

[RFC] solving a bug with hunks starting at line 1 in git apply

2015-06-01 Thread Remi LESPINET
== = 1. The bug == hunks of the form: @@ -1,k +n,m @@ have a special behavior because of the variable match_begining. For these hunks, offset is not allowed w

Re: [PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit

2015-06-01 Thread Matthieu Moy
Junio C Hamano writes: > Galan Rémi writes: > >> Instead of removing a line to remove the commit, you can use the >> command "drop" (just like "pick" or "edit"). It has the same effect as >> deleting the line (removing the commit) except that you keep a visual >> trace of your actions, allowing

Re: [PATCH 2/2] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-01 Thread Junio C Hamano
Junio C Hamano writes: > Remi Lespinet writes: > >> Accept a list of emails separated by commas in flags --cc, --to and >> --bcc. Multiple addresses can already be given by using these options >> multiple times, but it is more convenient to allow cutting-and-pasting >> a list of addresses from

Re: Getting the full path of a conflicting file within a custom merge driver?

2015-06-01 Thread Junio C Hamano
"Gondek, Andreas" writes: > I'm wondering if there is no option to find out the full path of a > conflicting file from within a custom merge driver? If I understand > this correctly, Git only provides the name of the 3 temporary local > files and the size of the limiter. But is there any possibil

Re: [PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit

2015-06-01 Thread Junio C Hamano
Galan Rémi writes: > Instead of removing a line to remove the commit, you can use the > command "drop" (just like "pick" or "edit"). It has the same effect as > deleting the line (removing the commit) except that you keep a visual > trace of your actions, allowing a better control and reducing t

Re: [PATCH] strbuf_read: skip unnecessary strbuf_grow at eof

2015-06-01 Thread Junio C Hamano
Jeff King writes: > On Sun, May 31, 2015 at 11:16:45AM -0700, Jim Hill wrote: > >> Make strbuf_read not try to do read_in_full's job too. If xread returns >> less than was requested it can be either eof or an interrupted read. If >> read_in_full returns less than was requested, it's eof. Use re

Re: [RFC/PATCH 0/3] silence missing-link warnings in some cases

2015-06-01 Thread Junio C Hamano
Jeff King writes: >> The fixes make sense to me (I haven't carefully read the >> implementation, but design/approach explained in the proposed log >> messages are very sound), and I think 3/3 is a good thing to do, >> too, in the new world order after d3038d2. > > I think it's rather the opposite

Re: [PATCH 1/3] t6301: new tests of for-each-ref error handling

2015-06-01 Thread Jeff King
On Mon, Jun 01, 2015 at 05:53:49PM +0200, Michael Haggerty wrote: > Add tests that for-each-ref correctly reports broken loose reference > files and references that point at missing objects. In fact, two of > these tests fail, because (1) NULL_SHA1 is not recognized as an > invalid reference value

[PATCH 2/3] for-each-ref: report broken references correctly

2015-06-01 Thread Michael Haggerty
If there is a loose reference file with invalid contents, "git for-each-ref" incorrectly reports the problem as being a missing object with name NULL_SHA1: $ echo '12345678' >.git/refs/heads/nonsense $ git for-each-ref fatal: missing object for

[PATCH 3/3] read_loose_refs(): treat NULL_SHA1 loose references as broken

2015-06-01 Thread Michael Haggerty
NULL_SHA1 is never a valid value for a reference. If a loose reference has that value, mark it as broken. Why check NULL_SHA1 and not the nearly 2^160 other SHA-1s that are also invalid in a given repository? Because (a) it is cheap to test for NULL_SHA1, and (b) NULL_SHA1 is often used as a "SHA-

[PATCH 0/3] Fix how for-each-ref handles broken loose references

2015-06-01 Thread Michael Haggerty
Currently, "git for-each-ref" fails to handle REF_ISBROKEN references correctly, treating them instead as valid references that point at NULL_SHA1. Sometimes this makes for-each-ref emit the wrong error message; sometimes it even appears to complete successfully. Instead, emit warnings for broken

[PATCH 1/3] t6301: new tests of for-each-ref error handling

2015-06-01 Thread Michael Haggerty
Add tests that for-each-ref correctly reports broken loose reference files and references that point at missing objects. In fact, two of these tests fail, because (1) NULL_SHA1 is not recognized as an invalid reference value, and (2) for-each-ref doesn't respect REF_ISBROKEN. Fixes to come. Signed

Getting the full path of a conflicting file within a custom merge driver?

2015-06-01 Thread Gondek, Andreas
Hello, I'm wondering if there is no option to find out the full path of a conflicting file from within a custom merge driver? If I understand this correctly, Git only provides the name of the 3 temporary local files and the size of the limiter. But is there any possibility to get the path of th

Re: [RFC/PATCH 0/3] silence missing-link warnings in some cases

2015-06-01 Thread Jeff King
On Mon, Jun 01, 2015 at 08:03:05AM -0700, Junio C Hamano wrote: > > The reason is that since git d3038d2 (prune: keep objects reachable from > > recent objects, 2014-10-15), we will traverse objects that are not > > reachable but have recent mtimes (within the 2-week prune expiration > > window).

Re: [PATCH 2/2] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-01 Thread Junio C Hamano
Remi Lespinet writes: > Accept a list of emails separated by commas in flags --cc, --to and > --bcc. Multiple addresses can already be given by using these options > multiple times, but it is more convenient to allow cutting-and-pasting > a list of addresses from the header of an existing e-mail

Re: [PATCH 2/2] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-01 Thread Matthieu Moy
Remi Lespinet writes: > Remove the limitation imposed by 79ee555b (Check and document the > options to prevent mistakes, 2006-06-21) which rejected every argument > with comma in --cc, --to and --bcc Missing "." at the end of sentence. > -The --bcc option must be repeated for each user you want

Re: [PATCH] l10n: de.po: translate "index" as "Index"

2015-06-01 Thread phillip
Hi, >> #: sequencer.c:661 >> #, c-format >> msgid "git %s: failed to read the index" >> -msgstr "git %s: Fehler beim Lesen der Staging-Area" >> +msgstr "git %s: Fehler beim Lesen des Indexes" > >Now we have to decide whether we flex "Index" like a foreign word in >German or like a German wo

Re: [PATCH v2 1/2] completion: Add sequencer function

2015-06-01 Thread SZEDER Gábor
Quoting Junio C Hamano : SZEDER Gábor writes: I don't see the benefits of this change. This patch adds more than twice as many lines as it removes, and patch 2/2 adds 8 new lines although it could get away with only 5 without this function. To offer sequencer options we currently go throug

Re: [RFC/PATCH 0/3] silence missing-link warnings in some cases

2015-06-01 Thread Junio C Hamano
Jeff King writes: > Stefan noticed that running "git gc" with a recent version of git causes > some useless complaints about missing objects. > > The reason is that since git d3038d2 (prune: keep objects reachable from > recent objects, 2014-10-15), we will traverse objects that are not > reachab

Re: [PATCH] format-patch: dereference tags with --ignore-if-in-upstream

2015-06-01 Thread Junio C Hamano
"brian m. carlson" writes: > diff --git a/builtin/log.c b/builtin/log.c > index dd8f3fc..e0465ba 100644 > --- a/builtin/log.c > +++ b/builtin/log.c > @@ -807,6 +807,12 @@ static void get_patch_ids(struct rev_info *rev, struct > patch_ids *ids) > o2 = rev->pending.objects[1].item; > f

Re: seg fault in "git format-patch"

2015-06-01 Thread Bruce Korb
On Sun, May 31, 2015 at 4:53 PM, Christian Couder wrote: >> (Please don't top post if you reply to this email as it is frown upon >> on this list.) WRT "top posting", two points: 1. Too many sites/lists now *require* top posting 2. MUA's (like Google Mail) hide the old mail as an obscure squiggl

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-06-01 Thread Junio C Hamano
Karthik Nayak writes: > Could be achieved using a simple wrapper around 'filter_refs()' > something like this perhaps. > > int filter_refs_with_pattern(struct ref_array *ref, int > (*for_each_ref_fn)(each_ref_fn, void *), char **patterns) > { > int i; > struct ref_filter_cbdata data;

Re: [WIP/PATCH v4 1/8] for-each-ref: extract helper functions out of grab_single_ref()

2015-06-01 Thread Junio C Hamano
Matthieu Moy writes: > Just match_refname may not carry all the semantics of the function, > which matches a prefix up to the end of string, or up to a / (but you > can't just be a prefix stopping in the middle of a word). To me, the > "_as_path" helped understanding the overall behavior of the f

Re: [PATCH v2 1/2] completion: Add sequencer function

2015-06-01 Thread Junio C Hamano
SZEDER Gábor writes: > I don't see the benefits of this change. This patch adds more than > twice as many lines as it removes, and patch 2/2 adds 8 new lines > although it could get away with only 5 without this function. To > offer sequencer options we currently go through a single if st

GIT BISECT old/new (fix/unfixed)

2015-06-01 Thread Antoine Delaite
Hi, git bisect old/new is an alternative to good/bad, which can be confusing to use in some situations. A work on it was done a few years ago, it is partially working but there are a lot of issues. We based on Christian Couder's github: https://github.com/chriscool/git/commits/boldnew2 We

Re: seg fault in "git format-patch"

2015-06-01 Thread Christian Couder
On Mon, Jun 1, 2015 at 3:44 PM, Christian Couder wrote: > > The following seems to fix it, but I am not sure it is the right fix: Ooops, I had not seen that Brian and Peff are already discussing a fix in this thread: http://thread.gmane.org/gmane.comp.version-control.git/270371 -- To unsubscribe

[PATCH 2/2] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-01 Thread Remi Lespinet
Accept a list of emails separated by commas in flags --cc, --to and --bcc. Multiple addresses can already be given by using these options multiple times, but it is more convenient to allow cutting-and-pasting a list of addresses from the header of an existing e-mail message, which already lists th

[PATCH 1/2] t9001-send-email: create a function replacing variable fields

2015-06-01 Thread Remi Lespinet
Create a function which replaces Date, Message-Id and X-Mailer lines generated by git-send-email by a specific string Date:.*$ -> Date: DATE-STRING Message-Id:.*$ -> Message-Id: MESSAGE-ID-STRING X-Mailer:.*$ -> X-Mailer: X-MAILER-STRING This is a preparatory for the next commit which use

[RFC/PATCH 2/2] messages: uniform error messages for index write

2015-06-01 Thread Michael J Gruber
Currently, we have different wordings for the same index write error message, which may be confusing to users and increases the risk of more severely different translated messages: builtin/add.c: die(_("Unable to write new index file")); builtin/apply.c:die

[PATCH 1/2] show-index: uniform error messages for index read

2015-06-01 Thread Michael J Gruber
Currently, we have different wordings for the same index read error message, which may be confusing to users and increase3s the risk of more severely different translated messages: builtin/apply.c:die(_("unable to read index file")); show-index.c: die("una

[PATCH 0/2] uniform error messages for index read and write

2015-06-01 Thread Michael J Gruber
Currently we use different messages for the same error. Make them uniform. Michael J Gruber (2): show-index: uniform error messages for index read messages: uniform error messages for index write builtin/add.c| 2 +- builtin/apply.c | 2 +- builtin/checkout-index.c |

Re: seg fault in "git format-patch"

2015-06-01 Thread Christian Couder
On Mon, Jun 1, 2015 at 2:01 AM, Christian Couder wrote: > On Mon, Jun 1, 2015 at 1:53 AM, Christian Couder > wrote: >> On Mon, Jun 1, 2015 at 1:14 AM, Christian Couder >> wrote: >>> On Sun, May 31, 2015 at 10:45 PM, Bruce Korb wrote: Oh, you can also clone the gnu-pw-mgr and likely get the

[PATCH] Improved example "To move the whole tree into a subdirectory...".

2015-06-01 Thread Brett Randall
Previously this example would fail if the history contained any empty commit, because the index would not change, and the mv would fail with: mv: cannot stat /index.new': No such file or directory The updated example checks whether the index file has been created before attempting the mv. The em

Re: Bug in 'git am' when applying a broken patch

2015-06-01 Thread Christian Couder
Hi Greg, On Mon, Jun 1, 2015 at 3:54 AM, Greg KH wrote: > On Mon, Jun 01, 2015 at 09:17:59AM +0900, Greg KH wrote: >> Hi all, >> >> I received the patch attached below as part of a submission against the >> Linux kernel tree. The patch seems to have been hand-edited, and is not >> correct, and p

[PATCH/RFCv2 2/2] git rebase -i: warn about removed commits

2015-06-01 Thread Galan Rémi
Check if commits were removed (i.e. a line was deleted) and print warnings or abort git rebase according to the value of the configuration variable rebase.checkLevel. Add the configuration variable rebase.checkLevel. - When unset or set to "ignore", no checking is done. - When set to "warn

[PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit

2015-06-01 Thread Galan Rémi
Instead of removing a line to remove the commit, you can use the command "drop" (just like "pick" or "edit"). It has the same effect as deleting the line (removing the commit) except that you keep a visual trace of your actions, allowing a better control and reducing the possibility of removing a c

  1   2   >