Re: [RFC PATCH] git log: support "auto" decorations

2014-05-29 Thread Jeff King
On Thu, May 29, 2014 at 09:54:10PM -0700, Linus Torvalds wrote: > That said, part of it is just that show-signature is so suboptimal > performance-wise, re-parsing the commit buffer for each commit when > "show_signature" is set. That's just crazy, we've already parsed the > commit text, we alread

Re: [RFC PATCH] git log: support "auto" decorations

2014-05-29 Thread Linus Torvalds
On Thu, May 29, 2014 at 6:58 PM, Jeff King wrote: > > I will spare you the usual lecture on having these lines in the message > body. ;) We do it for the kernel because they often get lost otherwise. Particularly the date/author. git doesn't tend to have the same kind of deep email forwarding mo

Re: .gitmodules containing SSH clone URLs should fall back to HTTPS when SSH key is not valid/existent

2014-05-29 Thread Chris Packham
On Fri, May 30, 2014 at 11:12 AM, Jonathan Leonard wrote: >> But you do not give much information about your special use >> case. I assume you have submodule repositories for which some >> developers have a valid ssh key and others don't (maybe >> because they should only have read access via http

Re: [PATCH] Improve function dir.c:trim_trailing_spaces()

2014-05-29 Thread Jeff King
On Thu, May 29, 2014 at 02:34:33PM -0700, Pasha Bolokhov wrote: > > However, I doubt it makes that much of a difference in practice, so > > unless it's measurable, I would certainly go with the version that is > > more readable (and correct, of course). > > Sorry, just to recap, you would go

Re: [PATCH] check_refname_component: Optimize

2014-05-29 Thread Duy Nguyen
On Fri, May 30, 2014 at 7:07 AM, Jeff King wrote: > But then we're just trusting that the "trust me" flag on disk is > correct. Why not just trust that packed-refs is correct in the first > place? > > IOW, consider this progression of changes: > > 1. Check refname format when we read packed-refs

Re: [RFC PATCH] git log: support "auto" decorations

2014-05-29 Thread Jeff King
On Thu, May 29, 2014 at 03:31:58PM -0700, Linus Torvalds wrote: > From: Linus Torvalds > Date: Thu, 29 May 2014 15:19:40 -0700 > Subject: [RFC PATCH] git log: support "auto" decorations I will spare you the usual lecture on having these lines in the message body. ;) > I actually like seeing dec

Re: Bugreport: git push disobeys -c remote.xxx.url=...

2014-05-29 Thread Jeff King
On Fri, May 30, 2014 at 02:03:56AM +0200, f...@fuz.su wrote: > I've tried to changing the URL of a remote temporarily because of network > issues. I tried something like this: > > git -c remote.foo.url=http://gitserver.example/repo.git push foo bar > > Tracing shows that git push does not us

[PATCH] t5537: re-drop http tests

2014-05-29 Thread Jeff King
These were originally removed by 0232852 (t5537: move http tests out to t5539, 2014-02-13). However, they were accidentally re-added in 1ddb4d7 (Merge branch 'nd/upload-pack-shallow', 2014-03-21). This looks like an error in manual conflict resolution. Here's what happened: 1. v1.9.0 shipped wi

Re: git 2.0.0 PROFILE=BUILD check-phase problems with ./t5561-http-backend.sh; GIT_TEST_HTTPD=false problems with t5537-fetch-shallow.sh

2014-05-29 Thread Jeff King
On Thu, May 29, 2014 at 11:44:37PM +0100, Nix wrote: > I observe test failures with git 2.0.0 which are attributable to the > change to run network tests by default. I'm lumping them both together > into one report because I'm lazy and I've blown too much time on this > already. Weird. I also see

Bugreport: git push disobeys -c remote.xxx.url=...

2014-05-29 Thread fuz
Hello! I've tried to changing the URL of a remote temporarily because of network issues. I tried something like this: git -c remote.foo.url=http://gitserver.example/repo.git push foo bar Tracing shows that git push does not use the provided URL for the remote foo and instead uses the URL con

Re: [PATCH] check_refname_component: Optimize

2014-05-29 Thread Jeff King
On Fri, May 30, 2014 at 06:43:18AM +0700, Duy Nguyen wrote: > >> The first time we read packed_refs, check_refname_format() is called > >> in read_packed_refs()->create_ref_entry() as usual. If we find no > >> problem, we store packed_refs stat() info in maybe packed_refs.stat. > >> Next time we r

Re: .gitmodules containing SSH clone URLs should fall back to HTTPS when SSH key is not valid/existent

2014-05-29 Thread Jeff King
On Thu, May 29, 2014 at 04:12:38PM -0700, Jonathan Leonard wrote: > We are using GitHub. > [...] > > But why is https special? Why not fall back to the git > > protocol? Or http? (And no: I'm not serious here ;-) > > > > HTTPS isn't special except in that it is the least privileged > transport ty

Re: [PATCH] check_refname_component: Optimize

2014-05-29 Thread Duy Nguyen
On Fri, May 30, 2014 at 6:41 AM, Jeff King wrote: > On Fri, May 30, 2014 at 06:24:30AM +0700, Duy Nguyen wrote: > >> >> I wonder if we can get away without SSE code by saving stat info of >> >> the packed-refs version that we have verified. When we read pack-refs, >> >> if stat info matches, skip

Re: [PATCH] check_refname_component: Optimize

2014-05-29 Thread Jeff King
On Fri, May 30, 2014 at 06:24:30AM +0700, Duy Nguyen wrote: > >> I wonder if we can get away without SSE code by saving stat info of > >> the packed-refs version that we have verified. When we read pack-refs, > >> if stat info matches, skip check_refname_component(). Assuming that > >> pack-refs d

git 2.0.0 PROFILE=BUILD check-phase problems with ./t5561-http-backend.sh; GIT_TEST_HTTPD=false problems with t5537-fetch-shallow.sh

2014-05-29 Thread Nix
I observe test failures with git 2.0.0 which are attributable to the change to run network tests by default. I'm lumping them both together into one report because I'm lazy and I've blown too much time on this already. I've got Apache 2.2.24 on this box, and t5551-http-fetch-smart.sh fails in a pe

Re: [PATCH] check_refname_component: Optimize

2014-05-29 Thread Duy Nguyen
On Thu, May 29, 2014 at 11:36 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Thu, May 29, 2014 at 6:49 AM, David Turner >> wrote: I assume that most of the time spent in check_refname_component() is while reading the packed-refs file, right? >>> >>> Yes. >> >> I wonder if we c

Re: .gitmodules containing SSH clone URLs should fall back to HTTPS when SSH key is not valid/existent

2014-05-29 Thread Jonathan Leonard
> But you do not give much information about your special use > case. I assume you have submodule repositories for which some > developers have a valid ssh key and others don't (maybe > because they should only have read access via https)? > Precisely. Specifically this is for a collection (17 or

[PATCH 5/5] fetch doc: update refspec format description

2014-05-29 Thread Junio C Hamano
The text made it sound as if the leading plus is the only thing that is optional, and forgot that is the same as :, i.e. fetch it and do not store anywhere. Signed-off-by: Junio C Hamano --- Documentation/pull-fetch-param.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/pul

[PATCH 0/5] Documentation updates for 'git fetch'

2014-05-29 Thread Junio C Hamano
Noticed that this page has antiquated description, which may still be correct, that can use some modernization. There are a few more larger updates coming, but these are small enough to be reviewed separately and quickly, so I am sending them out early. Junio C Hamano (5): fetch doc: update int

[PATCH 3/5] fetch doc: remove notes on outdated "mixed layout"

2014-05-29 Thread Junio C Hamano
In old days before Git 1.5, it was customery for "git fetch" to use the same local branch namespace to keep track of the remote-tracking branches, and it was necessary to tell users not to check them out and commit on them. Since everybody uses the separate remote layout these days, there is no ne

[PATCH 1/5] fetch doc: update introductory part for clarity

2014-05-29 Thread Junio C Hamano
- "Branches" is a more common way to say "heads" in these days. - Remote-tracking branches are used a lot more these days and it is worth mentioning that it is one of the primary side effects of the command to update them. - Avoid "X. That means Y." If Y is easier to understand to re

[PATCH 2/5] fetch doc: update note on '+' in front of the refspec

2014-05-29 Thread Junio C Hamano
While it is not *wrong* per-se to say that pulling a rewound/rebased branch will lead to an unnecessary merge conflict, that is not what the leading "+" sign to allow non-fast-forward update of remote-tracking branch is at all. Signed-off-by: Junio C Hamano --- Documentation/pull-fetch-param.txt

[PATCH 4/5] fetch doc: on pulling multiple refspecs

2014-05-29 Thread Junio C Hamano
Replace desription of old-style "Pull:" lines in remotes/ configuration with modern remote.*.fetch variables. As this note applies only to "git pull", enable it only in git-pull manual page. Signed-off-by: Junio C Hamano --- Documentation/pull-fetch-param.txt | 12 1 file changed,

[RFC PATCH] git log: support "auto" decorations

2014-05-29 Thread Linus Torvalds
From: Linus Torvalds Date: Thu, 29 May 2014 15:19:40 -0700 Subject: [RFC PATCH] git log: support "auto" decorations This works kind of like "--color=auto" - add decorations for interactive use, but do not change defaults when scripting or when piping the output to anything but a terminal. You c

[PATCH 11/10] fixup! t9904: new __git_ps1 tests for Zsh

2014-05-29 Thread Richard Hansen
Signed-off-by: Richard Hansen --- On 2014-05-29 15:02, Thomas Rast wrote: > Richard Hansen writes: > >> These are the same tests as in t9903, but run in zsh instead of bash. >> >> Signed-off-by: Richard Hansen >> --- >> t/lib-zsh.sh | 30 ++ >> t/t9904-zsh-

Re: [PATCH] Improve function dir.c:trim_trailing_spaces()

2014-05-29 Thread Pasha Bolokhov
On Thu, May 29, 2014 at 1:13 PM, Jeff King wrote: > On Wed, May 28, 2014 at 04:45:57PM -0700, Pasha Bolokhov wrote: > >> Move backwards from the end of the string (more efficient for >> lines which do not have trailing spaces or have just a couple). > > The original code reads the string from left

Re: [PATCH] Improve function dir.c:trim_trailing_spaces()

2014-05-29 Thread Jeff King
On Wed, May 28, 2014 at 04:45:57PM -0700, Pasha Bolokhov wrote: > Move backwards from the end of the string (more efficient for > lines which do not have trailing spaces or have just a couple). The original code reads the string from left to right. In theory, that means we could get away with not

Re: [BUG REPORT] Git log pretty date

2014-05-29 Thread Rodrigo Fernandes
Jeff, I have no idea what was the tool. The repo is not mine. I found the problem when I was doing some tests and the commit parsing was failing on that repo. Cumprimentos, Rodrigo Fernandes On Thu, May 29, 2014 at 8:49 PM, Jeff King wrote: > On Thu, May 29, 2014 at 11:57:15AM -0700, Junio C Ha

Re: [BUG REPORT] Git log pretty date

2014-05-29 Thread Jeff King
On Thu, May 29, 2014 at 11:57:15AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > ... > > to at least make --format date output consistent with the rest of git > > (and to make "%at" consistent with "%ad" and --date=raw). That still > > doesn't address Rodrigo's concern, though (we would

Re: [ANNOUNCE] Git v2.0.0

2014-05-29 Thread Jeff King
On Thu, May 29, 2014 at 09:23:06PM +0200, David Kastrup wrote: > > I do not think Junio or anyone else has the technical ability to remove > > messages from the archive. > > You can post self-destructing messages by adding X-no-archive: yes if I > am not mistaken. But that only concerns stuff yo

Reminder Notice

2014-05-29 Thread Jennifer Heldy Gerald
- Original Message - From: Jennifer H Gerald This Email is to notify you that your Email address have Won you an Award Sum of € 1.500,000.00 (1.5 Million Euros) in an E-mail balloting program Held in Europe. Pl

Re: [ANNOUNCE] Git v2.0.0

2014-05-29 Thread David Kastrup
Jeff King writes: > On Wed, May 28, 2014 at 06:17:25PM -0500, Felipe Contreras wrote: > >> This is the last mail I sent to you, because you ignore them anyway, and >> remove them from the mailing list. >> [...] >> [2], a mail you conveniently removed from the tracked record. >> [...] >> You also

Re: Git chokes on large file

2014-05-29 Thread Dale R. Worley
> From: David Lang > well, as others noted, the problem is actually caused by doing the diffs, and > that is something that is a very common thing to do with source code. To some degree, my attitude comes from When I Was A Boy, when you got 16k for both your bytecode and your data, so you never

Re: [PATCH 10/10] t9904: new __git_ps1 tests for Zsh

2014-05-29 Thread Thomas Rast
Richard Hansen writes: > These are the same tests as in t9903, but run in zsh instead of bash. > > Signed-off-by: Richard Hansen > --- > t/lib-zsh.sh | 30 ++ > t/t9904-zsh-prompt.sh | 10 ++ > 2 files changed, 40 insertions(+) > create mode 100644

Re: [BUG REPORT] Git log pretty date

2014-05-29 Thread Junio C Hamano
Jeff King writes: > ... > to at least make --format date output consistent with the rest of git > (and to make "%at" consistent with "%ad" and --date=raw). That still > doesn't address Rodrigo's concern, though (we would print "0 +"). > > For that, we would want on top: > > 1. Teach split_i

Re: [ANNOUNCE] Git v2.0.0

2014-05-29 Thread Jeff King
On Wed, May 28, 2014 at 06:17:25PM -0500, Felipe Contreras wrote: > This is the last mail I sent to you, because you ignore them anyway, and > remove them from the mailing list. > [...] > [2], a mail you conveniently removed from the tracked record. > [...] > You also conveniently removed this mai

Re: .gitmodules containing SSH clone URLs should fall back to HTTPS when SSH key is not valid/existent

2014-05-29 Thread Junio C Hamano
Jens Lehmann writes: > Am 29.05.2014 04:07, schrieb Jonathan Leonard: >> The title pretty much says it all. > > But you do not give much information about your special use > case. Perhaps "git grep insteadOf Documentation/" is all that is needed? -- To unsubscribe from this list: send the line "

Re: [PATCH v12 06/41] refs.c: add an err argument to repack_without_refs

2014-05-29 Thread Jonathan Nieder
Hi, Ronnie Sahlberg wrote: > Update repack_without_refs to take an err argument and update it if there > is a failure. Pass the err variable from ref_transaction_commit to this > function so that callers can print a meaningful error message if _commit > fails due to a problem in repack_without_re

Re: [PATCH] sideband.c: Get rid of ANSI sequences for non-terminal shell

2014-05-29 Thread Jeff King
On Wed, May 28, 2014 at 03:12:15AM +, Naumov, Michael (North Sydney) wrote: > Some git tools such as GitExtensions for Windows use environment > variable TERM=msys which causes the weird ANSI sequence shown for the > messages returned from server-side hooks > We add those ANSI sequences to hel

Re: [PATCH v11 25/41] fast-import.c: use a ref transaction when dumping tags

2014-05-29 Thread Jonathan Nieder
Ronnie Sahlberg wrote: > On Wed, May 28, 2014 at 4:39 PM, Jonathan Nieder wrote: >> Usually when ref_transaction_commit is called I can do >> >> struct strbuf err = STRBUF_INIT; >> if (ref_transaction_commit(..., &err)) >> die("%s", err.buf); >> >> and I know that

Re: [PATCH] check_refname_component: Optimize

2014-05-29 Thread Junio C Hamano
Duy Nguyen writes: > On Thu, May 29, 2014 at 6:49 AM, David Turner > wrote: >>> I assume that most of the time spent in check_refname_component() is >>> while reading the packed-refs file, right? >> >> Yes. > > I wonder if we can get away without SSE code by saving stat info of > the packed-ref

Re: [BUG REPORT] Git log pretty date

2014-05-29 Thread Jeff King
On Thu, May 29, 2014 at 05:50:56PM +0700, Duy Nguyen wrote: > On Thu, May 29, 2014 at 5:29 PM, Rodrigo Fernandes > wrote: > > I get an empty response on the date field, but since pretty has `%ad` > > it should follow the --date and return the date even if wrong. > > > > ... > > > > I tried to ch

Re: [PATCH v12 00/44] Use ref transactions for all ref updates

2014-05-29 Thread Ronnie Sahlberg
These patches are the remaining patches that need review in this series. Please review them. On Thu, May 29, 2014 at 9:07 AM, Ronnie Sahlberg wrote: > This patch series can also be found at > https://github.com/rsahlberg/git/tree/ref-transactions > > > Ronnie please review these remaining patches

Re: [PATCH v11 25/41] fast-import.c: use a ref transaction when dumping tags

2014-05-29 Thread Ronnie Sahlberg
On Wed, May 28, 2014 at 4:39 PM, Jonathan Nieder wrote: > Ronnie Sahlberg wrote: > >> I rely on the fact that if the transaction has failed then it is safe >> to call ref_transaction_commit since it is guaranteed to return an >> error too. > > Yes, I am saying that behavior for ref_transaction_com

[PATCH v12 39/41] refs.c: propagate any errno==ENOTDIR from _commit back to the callers

2014-05-29 Thread Ronnie Sahlberg
In _commit, ENOTDIR can happen in the call to lock_ref_sha1_basic, either when we lstat the new refname and it returns ENOTDIR or if the name checking function reports that the same type of conflict happened. In both cases it means that we can not create the new ref due to a name conflict. For the

[PATCH v12 24/41] receive-pack.c: use a reference transaction for updating the refs

2014-05-29 Thread Ronnie Sahlberg
Wrap all the ref updates inside a transaction. Signed-off-by: Ronnie Sahlberg --- builtin/receive-pack.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index c323081..13f4a63 100644 --- a/builti

[PATCH v12 26/41] walker.c: use ref transaction for ref updates

2014-05-29 Thread Ronnie Sahlberg
Switch to using ref transactions in walker_fetch(). As part of the refactoring to use ref transactions we also fix a potential memory leak where in the original code if write_ref_sha1() would fail we would end up returning from the function without free()ing the msg string. Note that this function

[PATCH v12 32/41] refs.c: make delete_ref use a transaction

2014-05-29 Thread Ronnie Sahlberg
Change delete_ref to use a ref transaction for the deletion. At the same time since we no longer have any callers of repack_without_ref we can now delete this function. Change delete_ref to return 0 on success and -1 on failure instead of the previous 0 on success either 1 or -1 on failure. Signe

[PATCH v12 38/41] refs.c: pass a skip list to name_conflict_fn

2014-05-29 Thread Ronnie Sahlberg
Allow passing a list of refs to skip checking to name_conflict_fn. There are some conditions where we want to allow a temporary conflict and skip checking those refs. For example if we have a transaction that 1, guarantees that m is a packed refs and there is no loose ref for m 2, the transaction w

[PATCH v12 41/41] refs.c: make write_ref_sha1 static

2014-05-29 Thread Ronnie Sahlberg
No external users call write_ref_sha1 any more so lets declare it static. Signed-off-by: Ronnie Sahlberg --- refs.c | 6 +- refs.h | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 6414afc..aefa5bc 100644 --- a/refs.c +++ b/refs.c @@ -2618,6 +2618,

[PATCH v12 36/41] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-05-29 Thread Ronnie Sahlberg
Move the check for check_refname_format from lock_any_ref_for_update to lock_ref_sha1_basic. At some later stage we will get rid of lock_any_ref_for_update completely. This leaves lock_any_ref_for_updates as a no-op wrapper which could be removed. But this wrapper is also called from an external c

[PATCH v12 31/41] refs.c: make prune_ref use a transaction to delete the ref

2014-05-29 Thread Ronnie Sahlberg
Change prune_ref to delete the ref using a ref transaction. To do this we also need to add a new flag REF_ISPRUNING that will tell the transaction that we do not want to delete this ref from the packed refs. This flag is private to refs.c and not exposed to external callers. Signed-off-by: Ronnie

[PATCH v12 16/41] refs.c: add transaction.status and track OPEN/CLOSED/ERROR

2014-05-29 Thread Ronnie Sahlberg
Track the status of a transaction in a new status field. Check the field for sanity, i.e. that status must be OPEN when _commit/_create/_delete or _update is called or else die(BUG:...) Signed-off-by: Ronnie Sahlberg --- refs.c | 36 +++- 1 file changed, 35 insert

[PATCH v12 06/41] refs.c: add an err argument to repack_without_refs

2014-05-29 Thread Ronnie Sahlberg
Update repack_without_refs to take an err argument and update it if there is a failure. Pass the err variable from ref_transaction_commit to this function so that callers can print a meaningful error message if _commit fails due to a problem in repack_without_refs. Add a new function unable_to_loc

[PATCH v12 08/41] refs.c: add an err argument to delete_ref_loose

2014-05-29 Thread Ronnie Sahlberg
Add an err argument to delete_loose_ref so that we can pass a descriptive error string back to the caller. Pass the err argument from transaction commit to this function so that transaction users will have a nice error string if the transaction failed due to delete_loose_ref. Add a new function un

[PATCH v12 33/41] refs.c: pass the ref log message to _create/delete/update instead of _commit

2014-05-29 Thread Ronnie Sahlberg
Change the reference transactions so that we pass the reflog message through to the create/delete/update function instead of the commit message. This allows for individual messages for each change in a multi ref transaction. Signed-off-by: Ronnie Sahlberg --- branch.c | 4 ++-- bu

[PATCH v12 00/44] Use ref transactions for all ref updates

2014-05-29 Thread Ronnie Sahlberg
This patch series can also be found at https://github.com/rsahlberg/git/tree/ref-transactions Ronnie please review these remaining patches in this series. Sahlberg (44): refs.c: constify the sha arguments for ref_transaction_create|delete|update refs.c: allow passing NULL to ref_transa

[PATCH v12 25/41] fast-import.c: use a ref transaction when dumping tags

2014-05-29 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- fast-import.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/fast-import.c b/fast-import.c index 4a7b196..587ef4a 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1735,15 +1735,32 @@ static void dump_tags(voi

[PATCH v12 40/41] fetch.c: change s_update_ref to use a ref transaction

2014-05-29 Thread Ronnie Sahlberg
Change s_update_ref to use a ref transaction for the ref update. Signed-off-by: Ronnie Sahlberg --- builtin/fetch.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index faa1233..b13e8f9 100644 --- a/builtin/fetch.c +++

Re: git-multimail: migration: Config is not iterable

2014-05-29 Thread Elijah Newren
On Thu, May 29, 2014 at 7:22 AM, Azat Khuzhin wrote: > Hi there, > > Using the latest version of git-multimail there is an issue with > migration: > > $ ~azat/git-multimail/git-multimail/migrate-mailhook-config --overwrite > Traceback (most recent call last): ... > File "/home/azat/git-multimail

Re: [PATCH] tests: turn off git-daemon tests if FIFOs are not available

2014-05-29 Thread Jeff King
On Thu, May 29, 2014 at 01:36:14PM +0200, Stepan Kasal wrote: > Signed-off-by: Stepan Kasal > --- > > Hi, > mingw does not have FIFOs, so it cannot run git-daemon tests. Thanks. I took a peek at the mkfifo call here. It is used to make sure the daemon has started before we run the tests which

git-multimail: migration: Config is not iterable

2014-05-29 Thread Azat Khuzhin
Hi there, Using the latest version of git-multimail there is an issue with migration: $ ~azat/git-multimail/git-multimail/migrate-mailhook-config --overwrite Traceback (most recent call last): File "/home/azat/git-multimail/git-multimail/migrate-mailhook-config", line 271, in main(sys.arg

Re: [PATCH] check_refname_component: Optimize

2014-05-29 Thread Duy Nguyen
On Thu, May 29, 2014 at 6:49 AM, David Turner wrote: >> I assume that most of the time spent in check_refname_component() is >> while reading the packed-refs file, right? > > Yes. I wonder if we can get away without SSE code by saving stat info of the packed-refs version that we have verified. Wh

Re: [BUG REPORT] Git log pretty date

2014-05-29 Thread Duy Nguyen
On Thu, May 29, 2014 at 7:24 PM, Rodrigo Fernandes wrote: > Duy, can you point me where is the date print from normal `git log` or > `git show` so I can compare? It's the same function, show_date() in date.c. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of

[PATCH 3/4] diff.c: allow to pass more flags to diff_populate_filespec

2014-05-29 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c| 13 +++-- diffcore-rename.c | 6 -- diffcore.h| 3 ++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/diff.c b/diff.c index f72769a..54281cb 100644 --- a/diff.c +++ b/diff.c @@ -373,7 +373,7 @@ stat

[PATCH 1/4] wrapper.c: introduce gentle xmallocz that does not die()

2014-05-29 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- git-compat-util.h | 1 + wrapper.c | 68 ++- 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index f6d3a46..f23e4e4 100644 --- a/git-compat-u

[PATCH 4/4] diff: mark any file larger than core.bigfilethreshold binary

2014-05-29 Thread Nguyễn Thái Ngọc Duy
Too large files may lead to failure to allocate memory. If it happens here, it could impact quite a few commands that involve diff. Moreover, too large files are inefficient to compare anyway (and most likely non-text), so mark them binary and skip looking at their content. Noticed-by: Dale R. Wor

[PATCH 2/4] fsck: do not die when not enough memory to examine a pack entry

2014-05-29 Thread Nguyễn Thái Ngọc Duy
fsck is a tool that error() is more preferred than die(), but many functions embed die() inside beyond fsck's control. unpack_compressed_entry()'s using xmallocz is such a function, triggered from verify_packfile() -> unpack_entry(). Make it use xmallocz_gentle() instead. Noticed-by: Dale R. Worle

Re: [BUG REPORT] Git log pretty date

2014-05-29 Thread Rodrigo Fernandes
Dennis I think that could be an improvement. Duy, can you point me where is the date print from normal `git log` or `git show` so I can compare? On Thu, May 29, 2014 at 12:07 PM, Dennis Kaarsemaker wrote: > On do, 2014-05-29 at 11:29 +0100, Rodrigo Fernandes wrote: >> >> The problem happens whe

Re: [PATCH] check_refname_component: Optimize

2014-05-29 Thread brian m. carlson
On Wed, May 28, 2014 at 03:57:35PM -0400, David Turner wrote: > +ifdef NO_SSE > + BASIC_CFLAGS += -DNO_SSE This is not a great name. This implies the system does not have SSE (SSE 1), but in fact what you're concerned about is SSE 4. This will be confusing for users of older x86-64 processor

Re: [PATCH v4] Add an explicit GIT_DIR to the list of excludes

2014-05-29 Thread Duy Nguyen
On Thu, May 29, 2014 at 5:11 AM, Pasha Bolokhov wrote: >>> + len = strlen(n_git); /* real_path() has stripped trailing slash */ >>> + for (i = len - 1; i > 0 && !is_dir_sep(n_git[i]); i--) ; >>> + basename = n_git + i; >>> + if (is_dir_sep(*basename)) >>> + ba

[PATCH] tests: turn off git-daemon tests if FIFOs are not available

2014-05-29 Thread Stepan Kasal
Signed-off-by: Stepan Kasal --- Hi, mingw does not have FIFOs, so it cannot run git-daemon tests. Stepan t/lib-git-daemon.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh index bc4b341..9b1271c 100644 --- a/t/lib-git-daemon.sh +++ b/t/lib-g

Re: .gitmodules containing SSH clone URLs should fall back to HTTPS when SSH key is not valid/existent

2014-05-29 Thread Jens Lehmann
Am 29.05.2014 04:07, schrieb Jonathan Leonard: > The title pretty much says it all. But you do not give much information about your special use case. I assume you have submodule repositories for which some developers have a valid ssh key and others don't (maybe because they should only have read a

Re: [BUG REPORT] Git log pretty date

2014-05-29 Thread Dennis Kaarsemaker
On do, 2014-05-29 at 11:29 +0100, Rodrigo Fernandes wrote: > > The problem happens when I try to get a pretty log for a commit with a > wrong date. The commit is: === $ git cat-file commit e9dddaf24c9de45d9b4efdf38eff7c30eb200f48 tree d63aeb159635cb231e191505a95a129a3b4a7b38 parent 9276202f1c0dc

Re: [BUG REPORT] Git log pretty date

2014-05-29 Thread Duy Nguyen
On Thu, May 29, 2014 at 5:29 PM, Rodrigo Fernandes wrote: > I get an empty response on the date field, but since pretty has `%ad` > it should follow the --date and return the date even if wrong. > > ... > > I tried to check the source code but have no idea where to start, > maybe if you point me o

[PATCH 2/2] mingw: avoid const warning

2014-05-29 Thread Stepan Kasal
Fix const warnings in http-fetch.c and remote-curl.c main() where is argv declared as const. The fix should work for all future declarations of main, no matter whether the second parameter's type is "char**", "const char**", or "char *[]". Signed-off-by: Stepan Kasal --- compat/mingw.h | 5 +++-

[PATCH 1/2] Win32: move main macro to a function

2014-05-29 Thread Stepan Kasal
From: Karsten Blees Date: Fri, 7 Jan 2011 19:47:23 +0100 The code in the MinGW main macro is getting more and more complex, move to a separate initialization function for readabiliy and extensibility. Signed-off-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal ---

[PATCH 0/2] mingw: macro main(), const warnings

2014-05-29 Thread Stepan Kasal
Hello, mingw.h defines a preprocessor macro main(), so that it can wrap the original function and hoook into initialization. The real main() function can have different types of its second parameter (char**, const char**, char*[]). It is not easy to match the type and gcc issues a const warning.

Re: [PATCH v3] Add an explicit GIT_DIR to the list of excludes

2014-05-29 Thread Jakub Narębski
On Thu, May 29, 2014 at 4:33 AM, Pasha Bolokhov wrote: > > Agree, but "partial" here means... what? just a little doc? I'm sorry, I tried to be cute and failed :$ This is not official name for documentation files that are meant for inclusion and not as standalone manpages. I think they are simi

[BUG REPORT] Git log pretty date

2014-05-29 Thread Rodrigo Fernandes
Hi, I'm having some problems with the `git log` command. Setup: Happens in multiple versions, tested on 1.8.* and 2.* The problem happens when I try to get a pretty log for a commit with a wrong date. Executing the command: `git log --encoding=UTF-8 --date=raw --pretty=format:'%H,%P,%ad,%cd,%an