GSoC applicants: discuss other applicants patches, perhaps?

2015-03-05 Thread Junio C Hamano
The objective of GSoC program is to learn how to work on projects as a part of an open source community, and working in Git project is not only about writing your own patches. Constructively critiquing design and implementation of patches by other people is also an important skill you need to learn

[PATCH v3] git: make "git -C '' " not to barf

2015-03-05 Thread Karthik Nayak
It now acts like "cd ''" and does not barf and treats it as a no-op. This is useful if a caller function does not want to change directory and hence gives no path value, which would have generally caused git to output an undesired error message. Included a simple test to check the same, as suggest

Re: Surprising interaction of "binary" and "eol" gitattributes

2015-03-05 Thread Torsten Bögershausen
On 03/05/2015 11:08 PM, Junio C Hamano wrote: Michael Haggerty writes: I would expect that the following .gitattributes file * eol=crlf *.png -text would leave EOL translation turned off for PNG files. In other words, I would expect that explicitly setting "-text" would tak

[PATCH][GSoC] revision: forbid --graph and --no-walk usage

2015-03-05 Thread Akshay Aurora
Signed-off-by: Akshay Aurora --- This is my first patch for a GSoC Microproject, would be great to have your feedback. revision.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/revision.c b/revision.c index bd027bc..d578652 100644 --- a/revision.c +++ b/revision.c @@ -224

Re: [PATCH 0/5] Retry if fdopen() fails due to ENOMEM

2015-03-05 Thread Torsten Bögershausen
On 03/05/2015 05:07 PM, Michael Haggerty wrote: One likely reason for fdopen() to fail is the lack of memory for allocating a FILE structure. When that happens, try freeing some memory and calling fdopen() again in the hope that it will work the second time. This change was suggested by Jonathan

Re: [PATCH][GSoC] revision: forbid --graph and --no-walk usage

2015-03-05 Thread Akshay Aurora
Not sure, why this mail is not showing on Gmane. I used git to send the email, and tested it by sending the patch to myself before sending it to the list. On Fri, Mar 6, 2015 at 12:40 AM, Akshay Aurora wrote: > Signed-off-by: Akshay Aurora > --- > This is my first patch for a GSoC Microproject,

Re: An interesting opinion on DVCS/git

2015-03-05 Thread Sitaram Chamarty
On 03/04/2015 08:55 PM, Michael J Gruber wrote: > Yes, that article has a few really weak lines of arguments, such as the > tutorial count. Here's his definition of the main draw of a DVCS: No, the only thing that a DVCS gets you, by definition, is that everyone gets a copy of the full o

Checkout --force without complete overwrite?

2015-03-05 Thread Phil Hord (hordp)
I have a repo whose workdir tends to get pretty dirty as I jump around from branch to branch tending weeds and whatnot. Sometimes when I try to switch branches git refuses because of local file changes. git checkout otherbranch error: Your local changes to the following files would be over

Re: [PATCH] for the SoC15 micro project, Make "git -C '' cmd" not to barf.

2015-03-05 Thread Stefan Beller
On Thu, Mar 5, 2015 at 5:46 PM, Prudhvee Narasimha Sadha wrote: > Hi, > here is my patch for the micro project, Please review the code. > > > prudh@prudh-Studio-1569:~/git$ git diff Please see Documentation/SubmittingPatches and maybe have a look at the format-patch manpage. Thanks, Stefan

[PATCH] for the SoC15 micro project, Make "git -C '' cmd" not to barf.

2015-03-05 Thread Prudhvee Narasimha Sadha
Hi, here is my patch for the micro project, Please review the code. prudh@prudh-Studio-1569:~/git$ git diff diff --git a/git.c b/git.c index 8c7ee9c..364788b 100644 --- a/git.c +++ b/git.c @@ -205,6 +205,8 @@ static int handle_options(const char ***argv, int *argc, int

Re: Slow git pushes: sitting 1 minute in pack-objects

2015-03-05 Thread Stephen Morton
8GB of RAM. Sorry, typo. Steve On Thu, Mar 5, 2015 at 7:25 PM, Duy Nguyen wrote: > On Fri, Mar 6, 2015 at 4:03 AM, Stephen Morton > wrote: >> I'm experiencing very slow git pushes. On the order of 1 minute to push a >> trivial one-line change. When I set GIT_TRACE=1, I see that it seems to be

Re: Slow git pushes: sitting 1 minute in pack-objects

2015-03-05 Thread Duy Nguyen
On Fri, Mar 6, 2015 at 4:03 AM, Stephen Morton wrote: > I'm experiencing very slow git pushes. On the order of 1 minute to push a > trivial one-line change. When I set GIT_TRACE=1, I see that it seems to be > taking a lot of time in the pack-objects phase. > > Others are not seeing this with the s

Re: [PATCH v3 2/3] sha1_file: implement changes for "cat-file --literally -t"

2015-03-05 Thread Junio C Hamano
Karthik Nayak writes: > +const char *sha1_object_info_literally(const unsigned char *sha1) > +{ > + enum object_type type; > + struct strbuf sb = STRBUF_INIT; > + struct object_info oi = {NULL}; > + > + oi.typename = &sb; > + oi.typep = &type; > + if (sha1_object_info_exte

Re: [GSoC microproject] Add XDG support to the credential-store helper

2015-03-05 Thread Luis Ressel
Okay, I've had a look at Paul's patch for this. Sorry again for the dupe, I must've missed it before. I guess I'll attempt another microproject. However, I feel like my patch is really all that's neccessary; I don't think we should try to use both files if they exist -- I consider Paul's approach

Re: [GSoC microproject] Add XDG support to the credential-store helper

2015-03-05 Thread Luis Ressel
On Thu, 5 Mar 2015 23:38:19 +0100 Christian Couder wrote: > Hi, > > Last year, on the ideas page: > > http://git.github.io/SoC-2014-Ideas.html > > we also had the following improvement: > > "in some cases, git bisect may test too many merge bases, thus slowing > down the bisection (making it

Re: [PATCH] zlib: initialize git_zstream in git_deflate_init{,_gzip,_raw}

2015-03-05 Thread Junio C Hamano
René Scharfe writes: > Clear the git_zstream variable at the start of git_deflate_init() etc. > so that callers don't have to do that. > > Signed-off-by: Rene Scharfe Nice. "git grep -B1 git_deflate_init" tells me that all existing callers of the function do this memset(). Clearly the above i

[PATCH] zlib: initialize git_zstream in git_deflate_init{,_gzip,_raw}

2015-03-05 Thread René Scharfe
Clear the git_zstream variable at the start of git_deflate_init() etc. so that callers don't have to do that. Signed-off-by: Rene Scharfe --- archive-zip.c | 2 -- builtin/index-pack.c | 1 - builtin/pack-objects.c | 2 -- bulk-checkin.c | 1 - diff.c | 1 - fa

What's cooking in git.git (Mar 2015, #02; Thu, 5)

2015-03-05 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. A few more batches of topics have been merged to 'master', including both fixes and enhancements. First maintenance release for v2.3 was cut wit

Re: [GSoC microproject] Add XDG support to the credential-store helper

2015-03-05 Thread Christian Couder
Hi, On Thu, Mar 5, 2015 at 9:51 PM, Luis Ressel wrote: > I'm contributing this patch in preparation for a GSoC15 application with > the git project. In particular, I'm interested in the two bisect > improvements listed on the Ideas page. Does anyone have other > suggestions for potential improvem

Re: [ANNOUNCE] Git Merge Contributors Summit, April 8th, Paris

2015-03-05 Thread Junio C Hamano
Christian Couder writes: > On Tue, Feb 24, 2015 at 11:09 PM, Jeff King wrote: >> I wanted to make one more announcement about this, since a few more >> details have been posted at: >> >> http://git-merge.com/ >> >> since my last announcement. Specifically, I wanted to call attention to >> the

Re: [GSoC microproject] Add XDG support to the credential-store helper

2015-03-05 Thread Junio C Hamano
Luis Ressel writes: > Oh, and should I add a testcase for the new functionality introduced by > this patch? And if yes, what exactly should I test? Absolutely. Thinking things through to design what needs to be tested is part of the exercise ;-) You need to demonstrate that the new feature kic

Re: Surprising interaction of "binary" and "eol" gitattributes

2015-03-05 Thread Junio C Hamano
Michael Haggerty writes: > I would expect that the following .gitattributes file > > * eol=crlf > *.png -text > > would leave EOL translation turned off for PNG files. In other words, I > would expect that explicitly setting "-text" would take precedence over > the fact that setti

Re: [PATCH v3] diff --shortstat --dirstat: remove duplicate output

2015-03-05 Thread Junio C Hamano
Mårten Kongstad writes: > v3: change how tests count (part of) the dirstat number of lines: instead of > 'grep -c', use 'grep >filename && test_line_count'. Thanks to Torsten > Bögershausen and SZEDER Gábor for pointing out how to improve the tests. Thanks. I'd squash the following on top befor

Re: [PATCH v2 2/2] git-C: Add test to check "git -C ''"

2015-03-05 Thread Junio C Hamano
Karthik Nayak writes: > Add a test to check whether "git -C ''" works without giving an > error. This is achieved by adding a commit and checking the log > using "git -C ''" and comparing the log message with the commit > message. Why choose something complex like commit and log, though? Wouldn

[GSoC microproject] Add XDG support to the credential-store helper

2015-03-05 Thread Luis Ressel
I'm contributing this patch in preparation for a GSoC15 application with the git project. In particular, I'm interested in the two bisect improvements listed on the Ideas page. Does anyone have other suggestions for potential improvements of git bisect that would be suitable for such a GSoC project

[PATCH] Add XDG support to the credential-store helper

2015-03-05 Thread Luis Ressel
credential-store will use ${XDG_CONFIG_HOME}/credentials to store credentials if this file already exists and no --file option is given. Otherwise it'll fall back to ~/.git-credentials (status quo). Signed-off-by: Luis Ressel --- Documentation/git-credential-store.txt | 4 +++- credential-store.

Slow git pushes: sitting 1 minute in pack-objects

2015-03-05 Thread Stephen Morton
(Apologies, after a day I'm cross-posting from git.users. I think the question is maybe too technical for that group.) I'm experiencing very slow git pushes. On the order of 1 minute to push a trivial one-line change. When I set GIT_TRACE=1, I see that it seems to be taking a lot of time in the pa

Re: [ANNOUNCE] Git Merge Contributors Summit, April 8th, Paris

2015-03-05 Thread Christian Couder
Hi, On Tue, Feb 24, 2015 at 11:09 PM, Jeff King wrote: > I wanted to make one more announcement about this, since a few more > details have been posted at: > > http://git-merge.com/ > > since my last announcement. Specifically, I wanted to call attention to > the contributor's summit on the 8th

Re: Surprising interaction of "binary" and "eol" gitattributes

2015-03-05 Thread Torsten Bögershausen
On 2015-03-05 17.38, Michael Haggerty wrote: > I would expect that the following .gitattributes file > > * eol=crlf > *.png -text > > would leave EOL translation turned off for PNG files. In other words, I > would expect that explicitly setting "-text" would take precedence over >

Re: [PATCHv3 0/3]More diffs for commit/status

2015-03-05 Thread Junio C Hamano
Junio C Hamano writes: > Extending this line of thought further. > > If I am reading your patch 3/3 right, "status -v -v" shows the > header when there are patches to be shown for the category. I am > not sure if that is the most helpful way for the users, when either > c/i xor i/w diffs is mis

Re: [PATCHv3 0/3]More diffs for commit/status

2015-03-05 Thread Junio C Hamano
Junio C Hamano writes: > Michael J Gruber writes: > >> - Do we want the header line also for "status -v"? (I would say yes, but that >> would be a change to current behaviour.) > > I would not object to it very strongly, but I do not see a point in > changing the behaviour. > > And I do not se

Re: [PATCHv3 0/3]More diffs for commit/status

2015-03-05 Thread Junio C Hamano
Michael J Gruber writes: > v3 has the following changes: > - new leading patch by Junio to clean up t7508 (slightly modified by myself) > - adjust tests accordingly > - revert back to standard c/,i/ resp. i/,w/ diff prefixes with a header line > > Open questionis for 3/3: > - Do we need the heade

Re: [PATCH 0/5] Retry if fdopen() fails due to ENOMEM

2015-03-05 Thread Junio C Hamano
Michael Haggerty writes: > One likely reason for fdopen() to fail is the lack of memory for > allocating a FILE structure. When that happens, try freeing some > memory and calling fdopen() again in the hope that it will work the > second time. In codepaths where we are likely under memory pressu

[PATCH v2] archive-zip: mark text files in archives

2015-03-05 Thread René Scharfe
Set the text flag for ZIP archive entries that look like text files so that unzip -a can be used to perform end-of-line conversions. Info-ZIP zip does the same. Detect binary files the same way as git diff and git grep do, namely by checking for the attribute "diff" and its negation "-diff", and

Re: [PATCH 1/5] xfdopen(): if first attempt fails, free memory and try again

2015-03-05 Thread Junio C Hamano
Michael Haggerty writes: > One likely reason for the failure of fdopen() is a lack of free > memory. Interesting. Did you find this by code inspection? Or did you actually hit this issue in real life, and applying this patch helped? The latter would indicate that this failure is rather common

Re: Git merge driver / attributes bug in 2.3.1?

2015-03-05 Thread Junio C Hamano
"Gondek, Andreas" writes: > after upgrading the Git installation on one of our development servers > from 1.9.0-rc3 to 2.3.1 we are experiencing strange behavior of merge > drivers. Do you see the same with something slightly older, like say v2.2.0? The only change that I can think of offhand t

Re: [PATCH 1/2] git-credential-store: support XDG config dir

2015-03-05 Thread Junio C Hamano
Paul Tan writes: > On Wed, Mar 4, 2015 at 7:01 AM, Junio C Hamano wrote: >> Paul Tan writes: >> >>> struct credential entry = CREDENTIAL_INIT; >>> + int found_credential = 0; >>> >>> fh = fopen(fn, "r"); >>> if (!fh) { >>> if (errno != ENOENT) >>>

[PATCH v3 3/3] cat-file: add "--literally" option

2015-03-05 Thread Karthik Nayak
made changes to "cat-file" to include a "--literally" option which prints the type of the object without any complaints. Signed-off-by: Karthik Nayak --- builtin/cat-file.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/builtin/cat-file.c b/builtin

[PATCH v3 2/3] sha1_file: implement changes for "cat-file --literally -t"

2015-03-05 Thread Karthik Nayak
Add "sha1_object_info_literally()" which is to be used when the "literally" option is given to get the type of object and return it. It internally uses "sha1_object_info_extended()". Add "unpack_sha1_header_literally()" to unpack sha headers which may be greater than 32 bytes, which is the thresho

[PATCH v3 0/3] cat-file: add "--literally" option

2015-03-05 Thread karthik nayak
Third version of the patch submitted to add "-literlly" option to "cat-file" http://article.gmane.org/gmane.comp.version-control.git/264383 Thanks to Eric, Junio and David for suggesting changes on my first version. Thanks to Junio for suggestions on my second version. Changes from previous ver

[PATCH v3 1/3] cache: modify for "cat-file --literally -t"

2015-03-05 Thread Karthik Nayak
Add a "struct strbuf *typename" to object_info to hold the typename when the literally option is used. Add a flag to notify functions when literally is used. Signed-off-by: Karthik Nayak --- cache.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cache.h b/cache.h index 4d02efc..949ef4c 10

Re: [PATCH 1/5] xfdopen(): if first attempt fails, free memory and try again

2015-03-05 Thread Stefan Beller
On Thu, Mar 5, 2015 at 8:07 AM, Michael Haggerty wrote: > One likely reason for the failure of fdopen() is a lack of free > memory. > > Also expose a new function, fdopen_with_retry(), which retries on > ENOMEM but doesn't die() on errors. In a moment this function will be > used elsewhere. > > Su

Surprising interaction of "binary" and "eol" gitattributes

2015-03-05 Thread Michael Haggerty
I would expect that the following .gitattributes file * eol=crlf *.png -text would leave EOL translation turned off for PNG files. In other words, I would expect that explicitly setting "-text" would take precedence over the fact that setting "eol" implies that a file should be co

[PATCH 3/5] copy_to_log(): use fdopen_with_retry()

2015-03-05 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.c b/daemon.c index c3edd96..1d76ccf 100644 --- a/daemon.c +++ b/daemon.c @@ -421,8 +421,8 @@ static void copy_to_log(int fd) struct strbuf line = STRBUF_INIT;

[PATCH 1/5] xfdopen(): if first attempt fails, free memory and try again

2015-03-05 Thread Michael Haggerty
One likely reason for the failure of fdopen() is a lack of free memory. Also expose a new function, fdopen_with_retry(), which retries on ENOMEM but doesn't die() on errors. In a moment this function will be used elsewhere. Suggested-by: Jonathan Nieder Signed-off-by: Michael Haggerty --- git-

[PATCH 2/5] fdopen_lock_file(): use fdopen_with_retry()

2015-03-05 Thread Michael Haggerty
Suggested-by: Jonathan Nieder Signed-off-by: Michael Haggerty --- Jonathan's original suggestion was that this function should call xfdopen(). But a couple of callers of fdopen_lock_file() try to recover if it fails, so I decided to do it this way instead. lockfile.c | 2 +- 1 file changed, 1 i

[PATCH 0/5] Retry if fdopen() fails due to ENOMEM

2015-03-05 Thread Michael Haggerty
One likely reason for fdopen() to fail is the lack of memory for allocating a FILE structure. When that happens, try freeing some memory and calling fdopen() again in the hope that it will work the second time. This change was suggested by Jonathan Nieder [1] In the first patch it is unsatisfying

[PATCH 5/5] buffer_fdinit(): use fdopen_with_retry()

2015-03-05 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- vcs-svn/line_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcs-svn/line_buffer.c b/vcs-svn/line_buffer.c index 57cc1ce..10791cf 100644 --- a/vcs-svn/line_buffer.c +++ b/vcs-svn/line_buffer.c @@ -19,7 +19,7 @@ int buffer_init(struc

[PATCH 4/5] update_info_file(): use fdopen_with_retry()

2015-03-05 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- server-info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-info.c b/server-info.c index 34b0253..8c6f662 100644 --- a/server-info.c +++ b/server-info.c @@ -20,7 +20,7 @@ static int update_info_file(char *path, int (*generate)(FILE

Re: [RFC/PATCH 0/3] protocol v2

2015-03-05 Thread Stefan Beller
On Wed, Mar 4, 2015 at 5:03 PM, Stefan Beller wrote: > > If anyone wants to experiment with the data I gathered, I can make them > available. > All data of `ls-remote` including the gathering script is found at (112 kB .tar.xz) https://drive.google.com/file/d/0B7E93UKgFAfjcHRvM1N2YjBfTzA/view?us

Re: [PATCH] archive-zip: add --text parameter

2015-03-05 Thread René Scharfe
Am 05.03.2015 um 03:16 schrieb Junio C Hamano: René Scharfe writes: No sign-off, yet, because I'm not sure we really need another option. E.g. --text=all doesn't seem to be actually useful, but it was easy to implement. Info-ZIP's zip always creates archives like --text=auto does, so perhaps

Re: [PATCH] archive-zip: add --text parameter

2015-03-05 Thread René Scharfe
Am 04.03.2015 um 22:13 schrieb René Scharfe: diff --git a/archive-zip.c b/archive-zip.c index 4bde019..3767940 100644 --- a/archive-zip.c +++ b/archive-zip.c @@ -5,6 +5,7 @@ #include "archive.h" #include "streaming.h" #include "utf8.h" +#include "xdiff-interface.h" static int zip_date;

Bug? git submodule add SSL certificate problem: unable to get local issuer certificate

2015-03-05 Thread Aschemann Gerd
Hi, seems to be a bug: If adding a submodule from an https URL with a certificate issued by StartSSL (or even a private/self-signed one?) leads to the following error: $ git -c http.sslverify=false submodule add https://example.com/git/xxx.git Cloning into 'xxx'... fatal: unable to access

[PATCHv3 3/3] commit/status: show the index-worktree diff with -v -v

2015-03-05 Thread Michael J Gruber
git commit and git status in long format show the diff between HEAD and the index when given -v. This allows previewing a commit to be made. They also list tracked files with unstaged changes, but without a diff. Introduce '-v -v' which shows the diff between the index and the worktree in additio

[PATCHv3 2/3] t7508: test git status -v

2015-03-05 Thread Michael J Gruber
"status -v" had no test. Include one. This also requires changing the .gitignore subtests, which is a good thing: they include testing a .gitignore pattern now. Signed-off-by: Michael J Gruber --- t/t7508-status.sh | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --gi

[PATCHv3 0/3]More diffs for commit/status

2015-03-05 Thread Michael J Gruber
v3 has the following changes: - new leading patch by Junio to clean up t7508 (slightly modified by myself) - adjust tests accordingly - revert back to standard c/,i/ resp. i/,w/ diff prefixes with a header line Open questionis for 3/3: - Do we need the header to stick out even more? (I don't think

[PATCHv3 1/3] t7508: .gitignore 'expect' and 'output' files

2015-03-05 Thread Michael J Gruber
From: Junio C Hamano These files are used to observe the behaviour of the 'status' command and if there weren't any such observer, the expected output from 'status' wouldn't even mention them. Place them in .gitignore to unclutter the output expected by the tests. An added benefit is that futur

Re: Possible bug with git-rebase and post-rewrite hook

2015-03-05 Thread Francis Moreau
oops, I forgot to say that this happen with git 2.3.1. On 03/05/2015 02:55 PM, Francis Moreau wrote: > Hi, > > I have a suspect case which happens when rebasing a branch. > > I'm using the post-rewrite hook and during certain circumstance, my hook > is called by git-rebase with wrong parameters:

Possible bug with git-rebase and post-rewrite hook

2015-03-05 Thread Francis Moreau
Hi, I have a suspect case which happens when rebasing a branch. I'm using the post-rewrite hook and during certain circumstance, my hook is called by git-rebase with wrong parameters: argument is not related to one. This actually happens when git-rebase stops and reports: The previous cherr

Git merge driver / attributes bug in 2.3.1?

2015-03-05 Thread Gondek, Andreas
Hello, after upgrading the Git installation on one of our development servers from 1.9.0-rc3 to 2.3.1 we are experiencing strange behavior of merge drivers. A merge driver registered as "* merge=" in the .gitattributes is now executed even if there isn't any merge conflict. This only happens f

Re: weaning distributions off tarballs: extended verification of git tags

2015-03-05 Thread Michael Haggerty
On 03/03/2015 12:44 AM, Junio C Hamano wrote: > [...] > I was about to suggest another alternative. > > Pretend as if Git internally used SHA-512 (or whatever hash you > want to use) instead of SHA-1, compute the object names that > way. Recompute the contents of a tree object is by r

[PATCH v2 2/2] git-C: Add test to check "git -C ''"

2015-03-05 Thread Karthik Nayak
Add a test to check whether "git -C ''" works without giving an error. This is achieved by adding a commit and checking the log using "git -C ''" and comparing the log message with the commit message. Signed-off-by: Karthik Nayak --- t/t0056-git-C.sh | 10 ++ 1 file changed, 10 insertion

Re: [PATCH v2 2/2] git-C: Add test to check "git -C ''"

2015-03-05 Thread karthik nayak
On 03/05/2015 04:27 PM, Karthik Nayak wrote: Add a test to check whether "git -C ''" works without giving an error. This is achieved by adding a commit and checking the log using "git -C ''" and comparing the log message with the commit message. Signed-off-by: Karthik Nayak --- t/t0056-git-C

[PATCH v2 2/2] git-C: Add test to check "git -C ''"

2015-03-05 Thread Karthik Nayak
Add a test to check whether "git -C ''" works without giving an error. This is achieved by adding a commit and checking the log using "git -C ''" and comparing the log message with the commit message. Signed-off-by: Karthik Nayak --- t/t0056-git-C.sh | 10 ++ 1 file changed, 10 insertion

[PATCH v2 1/2] git: make "git -C '' " not to barf

2015-03-05 Thread Karthik Nayak
It now acts like "cd ''" and does not barf and treats it as a no-op, this is usefull if a caller function does not want to change directory and hence gives no path value, which would have generally caused git to output an undesired error message. Signed-off-by: Karthik Nayak --- git.c | 12 +

[PATCH 1/6] upload-pack: move shallow deepen code out of receive_needs()

2015-03-05 Thread Nguyễn Thái Ngọc Duy
This is a prep step for further refactoring. Besides reindentation and s/shallows\./shallows->/g, no other changes are expected. Signed-off-by: Nguyễn Thái Ngọc Duy --- upload-pack.c | 99 +++ 1 file changed, 52 insertions(+), 47 deletions(

[PATCH 6/6] upload-pack: example code to use get_shallow_commits_by_rev_list

2015-03-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- upload-pack.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/upload-pack.c b/upload-pack.c index 69a3828..e616e19 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -592,6 +592,18 @@ static void deepen(int depth, const struct object_

[PATCH 2/6] upload-pack: move "shallow" sending code out of deepen()

2015-03-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- upload-pack.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index 74f48f9..ea030f3 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -531,6 +531,20 @@ error: } } +sta

[PATCH 3/6] upload-pack: remove unused variable "backup"

2015-03-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- upload-pack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index ea030f3..79f5525 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -547,7 +547,7 @@ static void send_shallow(struct commit_list *resu

[PATCH 4/6] upload-pack: move "unshallow" sending code out of deepen()

2015-03-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- upload-pack.c | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index 79f5525..69a3828 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -545,21 +545,10 @@ static void send_

[PATCH 5/6] shallow.c: implement a generic shallow boundary finder based on rev-list

2015-03-05 Thread Nguyễn Thái Ngọc Duy
Instead of a custom commit walker like get_shallow_commits(), this new function uses rev-list to mark SHALLOW to all reachable commits. The definition of reachable is to be defined by the protocol later. This makes it more flexible to define shallow boundary. Note: if a commit has one not_shallow

Re: [RFH] GSoC 2015 application

2015-03-05 Thread Nguyễn Thái Ngọc Duy
On Thu, Mar 5, 2015 at 5:05 AM, Philip Oakley wrote: > Given the mention of the GSoC ideas list, I thought it worth writing out one > of my little ideas.. > > > A possible idea is to add a date based variant of shallow clone : > >  'git clone --date ...' > > in the same vein as the existing depth

Re: [PATCH] xmerge.c: fix xdl_merge to conform with the manual

2015-03-05 Thread Anton Trunov
On 04/03/15 23:01, Junio C Hamano wrote: > Anton Trunov writes: > >> For the code version before applying this patch the following scenario >> will take place if "git merge -Xignore-all-space remote" gets executed. >> >> base file: >> 1st line >> 2nd line >> >> master file: >> 1st line >> 2nd