Re: [PATCH] mergetools: add config option to disable auto-merge

2015-06-17 Thread Mike Rappazzo
On Wed, Jun 17, 2015 at 3:41 PM, Junio C Hamano wrote: > Michael Rappazzo writes: > >> For some mergetools, the current invocation of git mergetool will >> include an auto-merge flag. By default the flag is included, however if >> the git config option 'merge.automerge' is set to 'false', then t

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Junio C Hamano
Duy Nguyen writes: >>> How about this: >>> >>> git-checkout - Switch branches or restore changes to the working tree >> >> Gahh. We are NOT restoring CHANGES. We are restoring the whole >> contents to a path. > > "the whole contents" is only true when --patch is not used, I think. I've seen th

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Duy Nguyen
On Thu, Jun 18, 2015 at 2:58 AM, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> On 2015-06-17 21.23, Junio C Hamano wrote: >> [] Basically, I'm fine with anything starting with "Switch branches or", but please do change the headline ;-). >>> >>> Likewise; I agree "switch bran

[PATCH v2] fetch-pack: check for shallow if depth given

2015-06-17 Thread Mike Edgar
When a repository is first fetched as a shallow clone, either by git-clone or by fetching into an empty repo, the server's capabilities are not currently consulted. The client will send shallow requests even if the server does not understand them, and the resulting error may be unhelpful to the use

[PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-17 Thread Remi Lespinet
> Junio C Hamano writes > Suffix "rgx" that means "regular expression" is a bit unusual, and > also hard to read when squashed to another word. Elsewhere in the > same script, we seem to use $re_whatever to store precompiled > regular expressions, so perhaps $re_comment, $re_quote, etc.? Yes it'

[PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-17 Thread Remi Lespinet
Matthieu Moy writes > > + my $commentrgx=qr/\((?:[^)]*)\)/; > > + my $quotergx=qr/"(?:[^\"\\]|\\.)*"/; > > + my $wordrgx=qr/(?:[^]["\s()<>:;@\\,.]|\\.)+/; > > Spaces around = please. > ... > > + foreach my $token (@tokens) { > > + if ($token =~ /^[,;]$/) { > > Here and below: you'

Re: co-authoring commits

2015-06-17 Thread josh
On Wed, Jun 17, 2015 at 06:52:24PM -0400, Theodore Ts'o wrote: > On Wed, Jun 17, 2015 at 10:26:32PM +0200, Tuncer Ayaz wrote: > > > > By allowing multiple authors, you don't have to decide who's the > > primary author, as in such situations usually there is no primary at > > all. I sometimes delib

git difftool --dir-diff error in the presence of symlinks to directories

2015-06-17 Thread Ismail Badawi
Reproduce like this (using git 2.4.3): git init mkdir foo touch foo/bar git add . git commit -m "Initial commit." ln -s foo link git add . git commit -m "Add link to foo." git difftool -d HEAD^ HEAD That last command outputs: fatal: Unable to hash /Users/isbadawi/test/link hash-object /Users/isb

Re: co-authoring commits

2015-06-17 Thread Theodore Ts'o
On Wed, Jun 17, 2015 at 10:26:32PM +0200, Tuncer Ayaz wrote: > > By allowing multiple authors, you don't have to decide who's the > primary author, as in such situations usually there is no primary at > all. I sometimes deliberately override the author when committing and > add myself just as anot

Re: co-authoring commits

2015-06-17 Thread Junio C Hamano
j...@joshtriplett.org writes: > Author and committer are used by many git tools; if they weren't part of > the object header, they'd need to be part of some pseudo-header with a > standardized format that git can parse. Yes, the same goes to the address on Signed-off-by: footers. There recently

Re: co-authoring commits

2015-06-17 Thread josh
On Wed, Jun 17, 2015 at 02:51:18PM -0700, Junio C Hamano wrote: > j...@joshtriplett.org writes: > > > Having more than one author field in a commit would likely break things, > > but having a coauthor field seems plausible these days. Git added > > support for signed commits, and the world didn't

Re: [PATCH v2 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 03:23:49PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Wed, Jun 17, 2015 at 05:11:21PM -0400, Richard Hansen wrote: > > > >> + test -z "$1" && test -n "$quiet" && return > >> + eval "say_color_color=\$say_color_$1" > > > > Thanks, this look

Re: [PATCH v2 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Junio C Hamano
Jeff King writes: > On Wed, Jun 17, 2015 at 05:11:21PM -0400, Richard Hansen wrote: > >> +test -z "$1" && test -n "$quiet" && return >> +eval "say_color_color=\$say_color_$1" > > Thanks, this looks much simpler. > > In the non-quiet case, you will eval $say_color_, even th

Re: [PATCH v2 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 05:11:21PM -0400, Richard Hansen wrote: > + test -z "$1" && test -n "$quiet" && return > + eval "say_color_color=\$say_color_$1" Thanks, this looks much simpler. In the non-quiet case, you will eval $say_color_, even though we know it to be bogus.

Re: co-authoring commits

2015-06-17 Thread Tuncer Ayaz
On Wed, Jun 17, 2015 at 11:51 PM, Junio C Hamano wrote: > j...@joshtriplett.org writes: > > > Having more than one author field in a commit would likely break > > things, but having a coauthor field seems plausible these days. > > Git added support for signed commits, and the world didn't end, so >

Re: co-authoring commits

2015-06-17 Thread Junio C Hamano
j...@joshtriplett.org writes: > Having more than one author field in a commit would likely break things, > but having a coauthor field seems plausible these days. Git added > support for signed commits, and the world didn't end, so it's possible > to extend the commit format. Something being pos

Re: 'git status -z' missing separators on OSX

2015-06-17 Thread Eric Sunshine
On Tue, Jun 16, 2015 at 11:32 PM, Jeff King wrote: > On Tue, Jun 16, 2015 at 06:21:56PM -0500, Tad Hardesty wrote: >> ~/test (master #)$ git status -z | hexdump -C >> 41 20 20 61 41 20 20 62 |A aA b| >> 0008 > > That's really weird. I don't have a Yosemite

Re: [PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-17 Thread Junio C Hamano
Remi Lespinet writes: > parse_address_line had not the same behavior whether the user had > Mail::Address or not. Teach parse_address_line to behave like > Mail::Address. Sounds like a fun project ;-) > + my $commentrgx=qr/\((?:[^)]*)\)/; > + my $quotergx=qr/"(?:[^\"\\]|\\.)*"/; > +

[PATCH v2 0/2] redo fix for test-lib.sh color support

2015-06-17 Thread Richard Hansen
Changes from v1: * Eliminate the case statement and assume the user passed a sane value for $1. * Use the same test as the non-colorized version of say_color() when determining whether to suppress the output: assume that a message can only be suppresed if $1 is the empty string. T

[PATCH v2 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Richard Hansen
If tput needs ~/.terminfo for the current $TERM, then tput will succeed before HOME is changed to $TRASH_DIRECTORY (causing color to be set to 't') but fail afterward. One possible way to fix this is to treat HOME like TERM: back up the original value and temporarily restore it before say_color()

[PATCH v2 1/2] Revert "test-lib.sh: do tests for color support after changing HOME"

2015-06-17 Thread Richard Hansen
This reverts commit 102fc80d32094ad6598b17ab9d607516ee8edc4a. There are two issues with that commit: * It is buggy. In pseudocode, it is doing: color is set || TERM != dumb && color works && color=t when it should be doing: color is set || { TERM != dumb && color works &&

Re: co-authoring commits

2015-06-17 Thread josh
On Wed, Jun 17, 2015 at 01:57:12PM -0700, Junio C Hamano wrote: > Tuncer Ayaz writes: > > > On Wed, Jun 17, 2015 at 9:58 PM, Junio C Hamano wrote: > >> Tuncer Ayaz writes: > >> > >> > Is this something that breaks the design and would never be > >> > implemented, > >> > >> Yes. > > > > Junio, th

Re: co-authoring commits

2015-06-17 Thread josh
On Wed, Jun 17, 2015 at 10:26:32PM +0200, Tuncer Ayaz wrote: > On Wed, Jun 17, 2015 at 9:58 PM, Junio C Hamano wrote: > > Tuncer Ayaz writes: > > > > > Is this something that breaks the design and would never be > > > implemented, > > > > Yes. > > Junio, thanks for the quick response. > > I supp

Re: co-authoring commits

2015-06-17 Thread Junio C Hamano
Tuncer Ayaz writes: > On Wed, Jun 17, 2015 at 9:58 PM, Junio C Hamano wrote: >> Tuncer Ayaz writes: >> >> > Is this something that breaks the design and would never be >> > implemented, >> >> Yes. > > Junio, thanks for the quick response. > > I suppose things have changed since Jonathan Nieder's

Re: [PATCH] Documentation/i18n.txt: clarify character encoding support

2015-06-17 Thread Junio C Hamano
Karsten Blees writes: >> I do not think the removal of the text makes much sense here unless >> you add the equivalent to the new text below. >> >>> - The contents of the blob objects are uninterpreted sequences >>> of bytes. There is no encoding translation at the core >>> level. >>>

Re: co-authoring commits

2015-06-17 Thread Tuncer Ayaz
On Wed, Jun 17, 2015 at 9:58 PM, Junio C Hamano wrote: > Tuncer Ayaz writes: > > > Is this something that breaks the design and would never be > > implemented, > > Yes. Junio, thanks for the quick response. I suppose things have changed since Jonathan Nieder's response in [1] (2010), or I've rea

Re: [PATCH 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 03:55:05PM -0400, Richard Hansen wrote: > > I do not mind it so much as you have > > it, but it does mean adding a new field needs to update two spots. > > I also don't like the duplicate list of color types, and I considered > doing something similar to what you suggested

Re: [PATCH 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Junio C Hamano
Richard Hansen writes: > We could test if the variable is set first (test -n "${foo+set}"), at > the cost of a bit more complexity. > >> I do not mind it so much as you have >> it, but it does mean adding a new field needs to update two spots. > > I also don't like the duplicate list of color typ

Re: [PATCH] strbuf: stop out-of-boundary warnings from Coverity

2015-06-17 Thread Stefan Beller
On Wed, Jun 17, 2015 at 12:25 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> Just make strbuf_slopbuf[] large enough to keep Coverity happy. If it's >>> happy, we'll have cleaner defect list >> >> It's down 31 defects, roughly 10% of all things coverity detected as >> problematic. >> YAY

Re: [PATCH] strbuf: stop out-of-boundary warnings from Coverity

2015-06-17 Thread Stefan Beller
On Wed, Jun 17, 2015 at 12:12 PM, Jeff King wrote: > On Wed, Jun 17, 2015 at 10:58:10AM -0700, Stefan Beller wrote: > >> > Just make strbuf_slopbuf[] large enough to keep Coverity happy. If it's >> > happy, we'll have cleaner defect list >> >> It's down 31 defects, roughly 10% of all things coveri

Re: Should the --encoding argument to log/show commands make any guarantees about their output?

2015-06-17 Thread Junio C Hamano
Jeff King writes: > I would vote for a documentation change, perhaps like: > > Subject: docs: clarify that --encoding can produce invalid sequences > > In the common case that the commit encoding matches the > output encoding, we do not touch the buffer at all, which > makes things much more effi

Re: co-authoring commits

2015-06-17 Thread Junio C Hamano
Tuncer Ayaz writes: > Is this something that breaks the design and would never be implemented, Yes. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Junio C Hamano
Torsten Bögershausen writes: > On 2015-06-17 21.23, Junio C Hamano wrote: > [] >>> Basically, I'm fine with anything starting with "Switch branches or", >>> but please do change the headline ;-). >> >> Likewise; I agree "switch branches or" part is good. > > How about this: > > git-checkout - Sw

Re: Should the --encoding argument to log/show commands make any guarantees about their output?

2015-06-17 Thread Torsten Bögershausen
> * just make this more clear in the docs and/or > * should we adjust the behavior of --encoding or > * should we do something entirely different, like adding a new command line > option or The general spirit is to keep things backwards compatible, so that users which expect the "raw" (and possible

Re: [PATCH 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Richard Hansen
On 2015-06-17 15:43, Jeff King wrote: > On Wed, Jun 17, 2015 at 03:06:26PM -0400, Richard Hansen wrote: >> +say_color_error=$(tput bold; tput setaf 1) # bold red >> +say_color_skip=$(tput setaf 4) # blue >> +say_color_warn=$(tput setaf 3) # brown/yellow >> +say_color_pass=$(tput set

co-authoring commits

2015-06-17 Thread Tuncer Ayaz
Even though I don't have time to work on a feature like this, like others before me, I've been in situations where I would have liked to set more than one GIT_AUTHOR_NAME (etc.) for a single commit due to the involvement of multiple developers in authoring a change. Is this something that breaks t

Re: [PATCH v3 06/11] ref-filter: implement '--merged' and '--no-merged' options

2015-06-17 Thread karthik nayak
On Wed, Jun 17, 2015 at 2:08 PM, Matthieu Moy wrote: > Karthik Nayak writes: >> --- a/ref-filter.c >> +++ b/ref-filter.c >> @@ -901,12 +903,19 @@ static int ref_filter_handler(const char *refname, >> const struct object_id *oid, >> if (!match_points_at(&filter->points_at, oid->hash, refnam

Re: [PATCH 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 03:06:26PM -0400, Richard Hansen wrote: > If tput needs ~/.terminfo for the current $TERM, then tput will > succeed before HOME is changed to $TRASH_DIRECTORY (causing color to > be set to 't') but fail afterward. > > One possible way to fix this is to treat HOME like TERM

Re: [PATCH] mergetools: add config option to disable auto-merge

2015-06-17 Thread Junio C Hamano
Michael Rappazzo writes: > For some mergetools, the current invocation of git mergetool will > include an auto-merge flag. By default the flag is included, however if > the git config option 'merge.automerge' is set to 'false', then that > flag will now be omitted. ... and why is the "automerge

Re: slash in branch name

2015-06-17 Thread KK
On 17/06/2015 20:24, Jeff King wrote: On Wed, Jun 17, 2015 at 08:16:10PM +0100, KK wrote: remote: error: invalid key: hooks.denypush.branch.versions/4.3.2 remote: error: invalid key: hooks.allowmerge.versions/4.3.2 [...] Those are syntactically bogus config keys. Keys should be of the form

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Torsten Bögershausen
On 2015-06-17 21.23, Junio C Hamano wrote: [] >> Basically, I'm fine with anything starting with "Switch branches or", >> but please do change the headline ;-). > > Likewise; I agree "switch branches or" part is good. How about this: git-checkout - Switch branches or restore changes to the worki

[PATCH 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Richard Hansen
If tput needs ~/.terminfo for the current $TERM, then tput will succeed before HOME is changed to $TRASH_DIRECTORY (causing color to be set to 't') but fail afterward. One possible way to fix this is to treat HOME like TERM: back up the original value and temporarily restore it before say_color()

[PATCH 1/2] Revert "test-lib.sh: do tests for color support after changing HOME"

2015-06-17 Thread Richard Hansen
This reverts commit 102fc80d32094ad6598b17ab9d607516ee8edc4a. There are two issues with that commit: * It is buggy. In pseudocode, it is doing: color is set || TERM != dumb && color works && color=t when it should be doing: color is set || { TERM != dumb && color works &&

Re: [PATCH] strbuf: stop out-of-boundary warnings from Coverity

2015-06-17 Thread Junio C Hamano
Stefan Beller writes: >> Just make strbuf_slopbuf[] large enough to keep Coverity happy. If it's >> happy, we'll have cleaner defect list > > It's down 31 defects, roughly 10% of all things coverity detected as > problematic. > YAY! I actually think this is too ugly to live. If coverity is bugg

[PATCH 0/2] redo fix for test-lib.sh color support

2015-06-17 Thread Richard Hansen
Commit 102fc80d fixed a bug where tput was failing because it needed to read ~/.terminfo after HOME was changed. However, that commit is buggy, and it unnecessarily disables color support when tput needs to read from ~/.terminfo. This series does two things: * revert the buggy fix * fix it p

Re: slash in branch name

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 08:16:10PM +0100, KK wrote: > remote: error: invalid key: hooks.denypush.branch.versions/4.3.2 > remote: error: invalid key: hooks.allowmerge.versions/4.3.2 > [...] Those are syntactically bogus config keys. Keys should be of the form section.subsection.key and only "s

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Junio C Hamano
"Andres G. Aragoneses" writes: > Comments? No. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Junio C Hamano
Matthieu Moy writes: > Torsten Bögershausen writes: > >> My v3 will probably use the original line: >> git-checkout - Checkout a branch or paths to the working tree > > I think mentionning "Switch branch" was a real improvement. For someone > not familiar with the version control vocabulary, "ch

Re: 'git status -z' missing separators on OSX

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 09:07:36AM -0500, Tad Hardesty wrote: > Everything looks normal using the commands you described, and it does appear > to only affect status: > > ~/test (master)$ type git > git is hashed (/usr/local/bin/git) > ~/test (master)$ git config --list > core.repositoryformatver

slash in branch name

2015-06-17 Thread KK
Hi, After upgrade GIT from 1.7.2.5-3.1 to 1.7.10.4-1+wheezy1 following error appear: git push central versions/4.3.2 Counting objects: 45, done. Delta compression using up to 8 threads. Compressing objects: 100% (28/28), done. Writing objects: 100% (28/28), 13.01 KiB, done. Total 28 (delta 22)

Re: [PATCH v3 05/11] ref-filter: add parse_opt_merge_filter()

2015-06-17 Thread karthik nayak
On Wed, Jun 17, 2015 at 1:57 PM, Matthieu Moy wrote: > Err, for-each-ref already uses it before this series, no? > > So, you don't need any extra option to get for-each-ref, because it is > already there. Having these extra options is a good side effect, though. > > To make sure I'm clear enough,

Re: [PATCH] strbuf: stop out-of-boundary warnings from Coverity

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 10:58:10AM -0700, Stefan Beller wrote: > > Just make strbuf_slopbuf[] large enough to keep Coverity happy. If it's > > happy, we'll have cleaner defect list > > It's down 31 defects, roughly 10% of all things coverity detected as > problematic. > YAY! That's a good thing.

Re: [PATCH 3/3] trace: add GIT_TRACE_STDIN

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 05:04:04PM +0700, Duy Nguyen wrote: > I wonder if we could do it a bit differently. Instead of > GIT_TRACE_STDIN, I would add GIT_TRACE_HOOK that points to a script. > Whenever a command is run via run-command interface, the actual > command line to be executed would be "

[PATCH] progress: store throughput display in a strbuf

2015-06-17 Thread Jeff King
Coverity noticed that we strncpy() into a fixed-size buffer without making sure that it actually ended up NUL-terminated. This is unlikely to be a bug in practice, since throughput strings rarely hit 32 characters, but it would be nice to clean it up. The most obvious way to do so is to add a NUL-

Re: Should the --encoding argument to log/show commands make any guarantees about their output?

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 07:07:48PM +0200, Jan-Philip Gehrcke wrote: > The two-option scenario is totally clear. Although one must stress that the > "error-out" option can, as discussed, be kept minimally invasive: it is > sufficient (and common) to just skip those byte sequences (and replace them

Re: [PATCH] strbuf: stop out-of-boundary warnings from Coverity

2015-06-17 Thread Stefan Beller
> Just make strbuf_slopbuf[] large enough to keep Coverity happy. If it's > happy, we'll have cleaner defect list It's down 31 defects, roughly 10% of all things coverity detected as problematic. YAY! -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to maj

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Andres G. Aragoneses
On 17/06/15 19:24, Matthieu Moy wrote: Torsten Bögershausen writes: My v3 will probably use the original line: git-checkout - Checkout a branch or paths to the working tree I think mentionning "Switch branch" was a real improvement. For someone not familiar with the version control vocabular

Re: [PATCH 1/2] t3404: demonstrate CHERRY_PICK_HEAD bug

2015-06-17 Thread Junio C Hamano
Johannes Schindelin writes: > +test_expect_failure 'rebase --continue removes CHERRY_PICK_HEAD' ' > + git checkout -b commit-to-skip && > + for double in X 3 1 > + do > + seq 5 | sed "s/$double/&&/" >seq && > + git add seq && > + test_tick && > +

Re: [PATCH] strbuf: stop out-of-boundary warnings from Coverity

2015-06-17 Thread Stefan Beller
On Wed, Jun 17, 2015 at 3:16 AM, Nguyễn Thái Ngọc Duy wrote: > It usually goes like this > > strbuf sb = STRBUF_INIT; > if (!strncmp(sb.buf, "foo", 3)) >printf("%s", sb.buf + 3); > > Coverity thinks that printf() can be executed, and because initial > sb.buf only has one character

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Matthieu Moy
Torsten Bögershausen writes: > My v3 will probably use the original line: > git-checkout - Checkout a branch or paths to the working tree I think mentionning "Switch branch" was a real improvement. For someone not familiar with the version control vocabulary, "checkout" does not mean much (just

Re: [PATCH] notes: Use get_sha1_committish instead of read_ref in init_notes()

2015-06-17 Thread Johan Herland
On Wed, Jun 17, 2015 at 5:18 PM, Junio C Hamano wrote: > Mike Hommey writes: > > I'm tempted to make init_notes itself do the check, based on the value > > it is given for a "read_only" argument. > > Yeah, that would be one sensible way to go after making sure that > everything goes thru this int

Re: Should the --encoding argument to log/show commands make any guarantees about their output?

2015-06-17 Thread Jan-Philip Gehrcke
On 17.06.2015 18:42, Junio C Hamano wrote: Jan-Philip Gehrcke writes: I was surprised to see that the output of git log --encoding=utf-8 "--format=format:%b" can contain byte sequences that are invalid in UTF-8. Note: I am using git 2.1.4 and the %b format specifier represents the commi

Re: [PATCH v2] fetch-pack: check for shallow if depth given

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 07:48:14AM -0400, Mike Edgar wrote: > When a repository is first fetched as a shallow clone, either by > git-clone or by fetching into an empty repo, the server's capabilities > are not currently consulted. The client will send shallow requests even > if the server does not

Re: [PATCH] clone: check if server supports shallow clones

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 09:35:23AM -0700, Junio C Hamano wrote: > > Of course it's hard to add to the test suite, since we do not have a way > > of hitting a server that does not understand shallow (I simply fudged > > server_supports() to return false on the client). > > We've had the "shallow"

Re: [PATCH 0/2] rebase -i: Fix left-behind CHERRY_PICK_HEAD

2015-06-17 Thread Junio C Hamano
Johannes Schindelin writes: > The symptom is that .git/CHERRY_PICK_HEAD is left behind after > skipping an already-merged patch with `git rebase --continue` > instead of `git rebase --skip`. I always prefer the former > invocation because the latter would also skip legitimate patches > if there w

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Torsten Bögershausen
On 2015-06-17 18.19, Junio C Hamano wrote: > Junio C Hamano writes: > >> Matthieu Moy writes: >> >>> Yes, but "Switch branchs or discard local changes" still does not >>> describe "git checkout HEAD^^^ -- file.txt" (restore to an old state, >>> but does not switch branch) or "git checkout -- fil

Re: Should the --encoding argument to log/show commands make any guarantees about their output?

2015-06-17 Thread Junio C Hamano
Jan-Philip Gehrcke writes: > I was surprised to see that the output of > > git log --encoding=utf-8 "--format=format:%b" > > can contain byte sequences that are invalid in UTF-8. Note: I am using > git 2.1.4 and the %b format specifier represents the commit message > body. Yeah, if the origi

Re: [PATCH] clone: check if server supports shallow clones

2015-06-17 Thread Junio C Hamano
Jeff King writes: > On Thu, Jun 11, 2015 at 08:02:33PM +0700, Duy Nguyen wrote: > >> > I see that do_fetch_pack checks server_supports("shallow"). Is that >> > enough to cover all fetch cases? And if it is, why does it not cover the >> > matching clone cases? >> >> I think this replacement check

Re: [PATCH] notes: Use get_sha1_committish instead of read_ref in init_notes()

2015-06-17 Thread Jeff King
On Wed, Jun 17, 2015 at 06:02:46PM +0900, Mike Hommey wrote: > > In a sense that is weirdly broken already: > > > > $ git log --notes=:/foo >/dev/null > > warning: notes ref refs/notes/:/foo is invalid > > > > but I wonder if we should be making expand_notes_ref a little more > > careful as

Re: What's cooking in git.git (Jun 2015, #04; Tue, 16)

2015-06-17 Thread Junio C Hamano
Remi Galan Alfonso writes: > Junio C Hamano writes: >> * gr/rebase-i-drop-warn (2015-06-01) 2 commits >> - git rebase -i: warn about removed commits >> - git-rebase -i: add command "drop" to remove a commit >> >> Add "drop commit-object-name subject" command as another way to >> skip replaying o

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Junio C Hamano
Junio C Hamano writes: > Matthieu Moy writes: > >> Yes, but "Switch branchs or discard local changes" still does not >> describe "git checkout HEAD^^^ -- file.txt" (restore to an old state, >> but does not switch branch) or "git checkout -- file.txt" (get from the >> index). > > You are right, e

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Torsten Bögershausen
On 2015-06-17 17.29, Junio C Hamano wrote: > Matthieu Moy writes: > >> Yes, but "Switch branchs or discard local changes" still does not >> describe "git checkout HEAD^^^ -- file.txt" (restore to an old state, >> but does not switch branch) or "git checkout -- file.txt" (get from the >> index). >

Git completion not using ls-remote to auto-complete during push

2015-06-17 Thread Robert Dailey
I do the following: $ git push origin :topic If I stop halfway through typing 'topic' and hit TAB, auto-completion does not work if I do not have a local branch by that name (sometimes I delete my local branch first, then I push to delete it remotely). I thought that git completion code was suppo

Re: [PATCH/RFC v4 05/10] send-email: Allow use of aliases in the From field of --compose mode

2015-06-17 Thread Matthieu Moy
Remi Lespinet writes: > Aliases were expanded before checking the From field of the "checking" is misleading here. I thought you meant "check that the From field is well-formed", while you mean "set $sender based on the From: field". > --compose option. This is inconsistent with other fields >

Re: [PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-17 Thread Matthieu Moy
Remi Lespinet writes: > --- > git-send-email.perl | 54 > +++-- > 1 file changed, 52 insertions(+), 2 deletions(-) > > diff --git a/git-send-email.perl b/git-send-email.perl > index a0cd7ff..a1f6c18 100755 > --- a/git-send-email.perl > +++ b/git-s

Re: [PATCH v3] pull: allow dirty tree when rebase.autostash enabled

2015-06-17 Thread Junio C Hamano
Kevin Daudt writes: > rebase learned to stash changes when it encounters a dirty work tree, but > git pull --rebase does not. > > Only verify if the working tree is dirty when rebase.autostash is not > enabled. > > Signed-off-by: Kevin Daudt > Helped-by: Paul Tan > --- > Changes to v2: > - Dro

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Junio C Hamano
Matthieu Moy writes: > Yes, but "Switch branchs or discard local changes" still does not > describe "git checkout HEAD^^^ -- file.txt" (restore to an old state, > but does not switch branch) or "git checkout -- file.txt" (get from the > index). You are right, especially when file.txt does not ha

Re: [PATCH 2/2] rebase -i: do not leave a CHERRY_PICK_HEAD file behind

2015-06-17 Thread Johannes Schindelin
Hi, On 2015-06-17 14:58, SZEDER Gábor wrote: > Quoting Johannes Schindelin : >> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh >> index dc3133f..16e0a82 100644 >> --- a/git-rebase--interactive.sh >> +++ b/git-rebase--interactive.sh >> @@ -849,7 +849,11 @@ continue) >> #

Re: [PATCH] notes: Use get_sha1_committish instead of read_ref in init_notes()

2015-06-17 Thread Junio C Hamano
Mike Hommey writes: > I'm tempted to make init_notes itself do the check, based on the value > it is given for a "read_only" argument. Yeah, that would be one sensible way to go after making sure that everything goes thru this interface. > On the other hand, some commands > do their ref resolvi

Re: [PATCH 2/2] Documentation on git-checkout --ours/--theirs improved

2015-06-17 Thread Junio C Hamano
Simon Eugster writes: > A better picture would be nice. > And regarding the textual description, are you going to commit your version? Nah, I'd rather not take credit away from you ;-) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.ke

[PATCH/RFC v4 10/10] send-email: suppress meaningless whitespaces in from field

2015-06-17 Thread Remi Lespinet
Matthieu Moy writes > Remi Lespinet writes: > > if (defined $sender) { > > + $sender =~ s/^\s+|\s$//g; > I would say \s+ also for the second \s. Not really different, but it > feels wrong to iterate the substitution as many times as there are > trailing spaces to remove. Oops should hav

Re: [PATCH/RFC v4 10/10] send-email: suppress meaningless whitespaces in from field

2015-06-17 Thread Matthieu Moy
Remi Lespinet writes: > if (defined $sender) { > + $sender =~ s/^\s+|\s$//g; I would say \s+ also for the second \s. Not really different, but it feels wrong to iterate the substitution as many times as there are trailing spaces to remove. -- Matthieu Moy http://www-verimag.imag.fr/~moy/

Re: New Defects reported by Coverity Scan for git

2015-06-17 Thread Paul Tan
On Wed, Jun 17, 2015 at 9:54 PM, Duy Nguyen wrote: > I think Coverity caught this correctly. > > ** CID 1306846: Memory - illegal accesses (USE_AFTER_FREE) > /builtin/pull.c: 287 in config_get_rebase() > > >

[PATCH/RFC v4 08/10] send-email: consider quote as delimiter instead of character

2015-06-17 Thread Remi Lespinet
Do not consider quote inside a recipient name as character when they are not escaped. This interprets: "Jane" "Doe" as: "Jane Doe" instead of: "Jane\" \"Doe" Signed-off-by: Remi Lespinet --- I don't know if it's an argument for this change, but rfc2822 says: Semantically, neith

Re: 'git status -z' missing separators on OSX

2015-06-17 Thread Tad Hardesty
Everything looks normal using the commands you described, and it does appear to only affect status: ~/test (master)$ type git git is hashed (/usr/local/bin/git) ~/test (master)$ git config --list core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ign

[PATCH/RFC v4 10/10] send-email: suppress meaningless whitespaces in from field

2015-06-17 Thread Remi Lespinet
Remove leading and trailing whitespaces in from field before interepreting it to improve consistency with other options. The split_addrs function already take care of trailing and leading whitespaces for to, cc and bcc fields. The from option now: - has the same behavior when passing arguments l

Re: [PATCH 2/2] Documentation on git-checkout --ours/--theirs improved

2015-06-17 Thread Simon Eugster
2015-06-16 17:41 GMT+02:00 Junio C Hamano : > Simon Eugster writes: > >> 2015-06-15 22:10 GMT+02:00 Junio C Hamano : >>> >>> "Simon A. Eugster" writes: >>> >>> > --- >>> >>> - Lack of explanation as to why this is a good thing. >>> - Lack of sign-off. >>> >>> Why is there still 1/2, if its effect

[PATCH/RFC v4 09/10] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-17 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/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-17 Thread Remi Lespinet
parse_address_line had not the same behavior whether the user had Mail::Address or not. Teach parse_address_line to behave like Mail::Address. When the user input is correct, this implementation behaves exactly like Mail::Address except when there are quotes inside the name: "Jane Do"e In thi

[PATCH/RFC v4 01/10] t9001-send-email: move script creation in a setup test

2015-06-17 Thread Remi Lespinet
Move the creation of the scripts used in to-cmd and cc-cmd tests in a setup test to make them available for later tests. Signed-off-by: Remi Lespinet --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/t/t9001-send-email.sh b/t/t9001-send

[PATCH/RFC v4 04/10] send-email: refactor address list process

2015-06-17 Thread Remi Lespinet
Simplify code by creating a function which transform a list of strings containing email addresses (separated by commas, comporting aliases) into a clean list of valid email addresses. Signed-off-by: Remi Lespinet --- git-send-email.perl | 22 -- 1 file changed, 12 insertions(

[PATCH/RFC v4 05/10] send-email: Allow use of aliases in the From field of --compose mode

2015-06-17 Thread Remi Lespinet
Aliases were expanded before checking the From field of the --compose option. This is inconsistent with other fields (To, Cc, ...) which already support aliases. Signed-off-by: Remi Lespinet --- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-send-

[PATCH/RFC v4 03/10] t9001-send-email: refactor header variable fields replacement

2015-06-17 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 Signed-off-by: Remi Lespinet --- t/t9001-send-ema

[PATCH/RFC v4 06/10] send-email: minor code refactoring

2015-06-17 Thread Remi Lespinet
Group expressions in a single if statement. This avoid checking multiple time if the variable $sender is defined. Signed-off-by: Remi Lespinet --- git-send-email.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index f61449d

[PATCH/RFC v4 02/10] send-email: allow aliases in patch header and command script outputs

2015-06-17 Thread Remi Lespinet
Interpret aliases in: - Header fields of patches generated by git format-patch (using --to, --cc, --add-header for example) or manually modified. Example of fields in header: To: alias1 Cc: alias2 Cc: alias3 - Outputs of command scripts specified by --cc-cmd and

Fwd: New Defects reported by Coverity Scan for git

2015-06-17 Thread Duy Nguyen
I think Coverity caught this correctly. ** CID 1306846: Memory - illegal accesses (USE_AFTER_FREE) /builtin/pull.c: 287 in config_get_rebase() *** CID 1306846: Memory - illegal accesses (

Re: [PATCH 2/2] rebase -i: do not leave a CHERRY_PICK_HEAD file behind

2015-06-17 Thread SZEDER Gábor
Hi, Quoting Johannes Schindelin : When skipping commits whose changes were already applied via `git rebase --continue`, we need to clean up said file explicitly. The same is not true for `git rebase --skip` because that will execute `git reset --hard` as part of the "skip" handling in git-rebas

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Matthieu Moy
"Andres G. Aragoneses" writes: > On 17/06/15 13:54, Matthieu Moy wrote: >> "Andres G. Aragoneses" writes: >> >>> On 17/06/15 12:54, Matthieu Moy wrote: Duy Nguyen writes: > On Wed, Jun 17, 2015 at 2:54 PM, Torsten Bögershausen > wrote: >> -git-checkout - Checkout a branc

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Andres G. Aragoneses
On 17/06/15 13:54, Matthieu Moy wrote: "Andres G. Aragoneses" writes: On 17/06/15 12:54, Matthieu Moy wrote: Duy Nguyen writes: On Wed, Jun 17, 2015 at 2:54 PM, Torsten Bögershausen wrote: -git-checkout - Checkout a branch or paths to the working tree +git-checkout - Switch branches or r

Re: [PATCH v2] git-checkout.txt: Document "git checkout " better

2015-06-17 Thread Matthieu Moy
"Andres G. Aragoneses" writes: > On 17/06/15 12:54, Matthieu Moy wrote: >> Duy Nguyen writes: >> >>> On Wed, Jun 17, 2015 at 2:54 PM, Torsten Bögershausen wrote: -git-checkout - Checkout a branch or paths to the working tree +git-checkout - Switch branches or restore changes >>> >>> I

  1   2   >