Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-07 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: On Sat, Mar 7, 2015 at 5:49 AM, karthik nayak karthik@gmail.com wrote: Also *(*argv)[1] seems more readable to me, maybe more of a perspective? I also had considered suggesting (*argv)[1][0] as more readable, but it is primarily personal

[PATCH 1/2] configure: support HAVE_BSD_SYSCTL option

2015-03-07 Thread Kyle J. McKay
On BSD-compatible systems some information such as the number of available CPUs may only be available via the sysctl function. Add support for a HAVE_BSD_SYSCTL option complete with autoconf support and include the sys/syctl.h header when the option is enabled to make the sysctl function

[PATCH 2/2] thread-utils.c: detect CPU count on older BSD-like systems

2015-03-07 Thread Kyle J. McKay
Not all systems support using sysconf to detect the number of available CPU cores. Older BSD and BSD-derived systems only provide the information via the sysctl function. If HAVE_BSD_SYSCTL is defined attempt to retrieve the number of available CPU cores using the sysctl function. If

[PATCH v2 1/4] git-credential-store: support multiple credential files

2015-03-07 Thread Paul Tan
Previously, git-credential-store only supported storing credentials in a single file: ~/.git-credentials. In order to support the XDG base directory specification[1], git-credential-store needs to be able to lookup and erase credentials from multiple files, as well as to pick the appropriate file

[PATCH v2 3/4] docs/git-credential-store: document XDG file and precedence

2015-03-07 Thread Paul Tan
git-credential-store now supports an additional default credential file at $XDG_CONFIG_HOME/git/credentials. However, ~/.git-credentials takes precedence over it for backwards compatibility. To make the precedence ordering explicit, add a new section FILES that lists out the credential file paths

[PATCH v2 2/4] git-credential-store: support XDG_CONFIG_HOME

2015-03-07 Thread Paul Tan
Add $XDG_CONFIG_HOME/git/credentials to the default credential search path of git-credential-store. This allows git-credential-store to support user-specific configuration files in accordance with the XDG base directory specification[1]. [1]

[PATCH v2 0/4] git-credential-store: XDG user-specific config file support

2015-03-07 Thread Paul Tan
The previous patch series can be found at [1]. [1] http://thread.gmane.org/gmane.comp.version-control.git/264682 The changes are as follows: * Code refactor: instead of a gigantic blob of code in main(), store_credential(), remove_credential() and lookup_credential() have been modified to

Re: [PATCH v2 00/10] Use a structure for object IDs.

2015-03-07 Thread Junio C Hamano
brian m. carlson sand...@crustytoothpaste.net writes: Certain parts of the code have to be converted before others to keep the patch sizes small, maintainable, and bisectable, so functions and structures that are used across the codebase (e.g. struct object) will be converted later.

Re: [PATCH 2/2] help.c: use SHELL_PATH instead of hard-coded /bin/sh

2015-03-07 Thread Junio C Hamano
Kyle J. McKay mack...@gmail.com writes: If the user has set SHELL_PATH in the Makefile then we should respect that value and use it. Signed-off-by: Kyle J. McKay mack...@gmail.com --- builtin/help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/help.c

Re: [PATCH] [GSoC Microproject]Adding - shorthand for @{-1} in RESET command

2015-03-07 Thread Junio C Hamano
Sundararajan R dyou...@gmail.com writes: diff --git a/builtin/reset.c b/builtin/reset.c index 4c08ddc..62764d4 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -203,8 +203,16 @@ static void parse_args(struct pathspec *pathspec, * * At this point, argv points immediately

[PATCH v2 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-07 Thread Paul Tan
t0302 now tests git-credential-store's support for the XDG user-specific configuration file $XDG_CONFIG_HOME/git/credentials. Specifically: * Ensure that the XDG file is strictly opt-in. It should not be created by git at all times if it does not exist. * On the flip side, if the XDG file

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

2015-03-07 Thread karthik nayak
On 03/07/2015 12:58 AM, Junio C Hamano wrote: karthik nayak karthik@gmail.com writes: ... I suspect that the caller should supply a pointer to struct object_info, i.e. something along these lines: struct object_info oi = { NULL }; struct strbuf sb = STRBUF_INIT; enum

Re: [PATCH 10/24] untracked cache: save to an index extension

2015-03-07 Thread Stefan Beller
On Sun, Feb 8, 2015 at 12:55 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: + ouc = xmalloc(sizeof(*ouc) + len + 1); Do we need to free `ouc` at the end of the function as well? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-07 Thread karthik nayak
This iteration looks sensible, except that the Subject reads strange. Will queue with minor tweaks to the log message, and perhaps with a fix to unreadable *(*argv)[1] that was mentioned elsewhere. Thanks. Hey could you tell me what seems strange, so I can improve on it the next time.

Re: [PATCH] daemon: use strbuf for hostname info

2015-03-07 Thread René Scharfe
Am 07.03.2015 um 02:08 schrieb Jeff King: On Sat, Mar 07, 2015 at 01:20:22AM +0100, René Scharfe wrote: Not a big deal, but do we want to rename sanitize_client_strbuf to sanitize_client? It only had the unwieldy name to distinguish it from this one. A patch would look like this. The result

[GSoC] small project idea from my todo list.. Bundle Symbolic links

2015-03-07 Thread Philip Oakley
Hi folks, This is one of my small/mini projects from late year that got pushed down my stack that may be suitable for someone on the GSoC small project list: - Embed symbolic link references into the Bundle processing. Currently git bundle gets 'confused' when there are multiple refs using

[PATCH v2 1/2] daemon: use strbuf for hostname info

2015-03-07 Thread René Scharfe
Convert hostname, canon_hostname, ip_address and tcp_port to strbuf. This allows to get rid of the helpers strbuf_addstr_or_null() and STRARG because a strbuf always represents a valid (initially empty) string. sanitize_client() is not needed anymore and sanitize_client_strbuf() takes its place

[PATCH v2 2/2] daemon: deglobalize hostname information

2015-03-07 Thread René Scharfe
Move the variables related to the client-supplied hostname into its own struct, let execute() own an instance of that instead of storing the information in global variables and pass the struct to any function that needs to access it as a parameter. The lifetime of the variables is easier to see

[GSOC] Introduction

2015-03-07 Thread karthik nayak
Hello everyone! I am Karthik Nayak from Bangalore, India. I am currently pursuing my B.E in Computer Science. I am very keen on contributing to Git via GSoC 2015. I have worked on one of the micro projects[1], I like how code is reviewed via the mailing list, It always ensures different

Re: Bashing freelancers

2015-03-07 Thread David Kastrup
Junio C Hamano gits...@pobox.com writes: David Kastrup d...@gnu.org writes: Junio C Hamano gits...@pobox.com writes: David Kastrup d...@gnu.org writes: Good work is worth good money. Suggesting that people who are not able to work for free are morally inferior is not conducive for a

[PATCH] rev-list: refuse --first-parent combined with --bisect

2015-03-07 Thread Kevin Daudt
rev-list --bisect is used by git bisect, but never together with --first-parent. Because rev-list --bisect together with --first-parent is not handled currently, and even leads to segfaults, refuse to use both options together. Signed-off-by: Kevin Daudt m...@ikke.info --- This is my first code

Re: [PATCH] rev-list: refuse --first-parent combined with --bisect

2015-03-07 Thread Kevin Daudt
On Sat, Mar 07, 2015 at 10:31:16PM +0100, Kevin Daudt wrote: diff --git a/builtin/rev-list.c b/builtin/rev-list.c index ff84a82..c271e15 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -291,6 +291,9 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) if

Re: Please consider adding a -f switch to git-clone (or something similar)

2015-03-07 Thread brian m. carlson
On Sat, Mar 07, 2015 at 11:26:28PM +0100, Andreas Schwab wrote: Diego Viola diego.vi...@gmail.com writes: I know I could git-init in a empty directory You can also git init a non-empty directory. I have a script to set up a new throwaway VM with my dotfiles using git. It looks a bit like

Efficient parsing of `status -z` output

2015-03-07 Thread Matthew Rothenberg
I've been working on a utility that parses the output of `git status --porcelain` as a fundamental part of its operation. Since I would like for this tool to be as robust as possible (and cross-platform compatibility is a goal), I am currently trying to migrate it from parsing the output of

[PATCH v2 06/10] bulk-checkin.c: convert to use struct object_id

2015-03-07 Thread brian m. carlson
Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- bulk-checkin.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bulk-checkin.c b/bulk-checkin.c index 0c4b8a7..e50f60e 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -24,7 +24,7 @@ static struct

[PATCH v2 03/10] bisect.c: convert leaf functions to use struct object_id

2015-03-07 Thread brian m. carlson
Convert some constants to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- bisect.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/bisect.c b/bisect.c index 8c6d843..2692d54 100644 --- a/bisect.c +++

[PATCH v2 07/10] diff: convert struct combine_diff_path to object_id

2015-03-07 Thread brian m. carlson
Also, convert a constant to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- combine-diff.c | 56 diff-lib.c | 10 +- diff.h | 5 +++-- tree-diff.c| 10 +- 4 files changed,

[PATCH v2 09/10] patch-id: convert to use struct object_id

2015-03-07 Thread brian m. carlson
Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- builtin/patch-id.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/builtin/patch-id.c b/builtin/patch-id.c index 77db873..c208e7e 100644 --- a/builtin/patch-id.c +++

[PATCH v2 05/10] zip: use GIT_SHA1_HEXSZ for trailers

2015-03-07 Thread brian m. carlson
Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- archive-zip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archive-zip.c b/archive-zip.c index 4bde019..b669e50 100644 --- a/archive-zip.c +++ b/archive-zip.c @@ -427,12 +427,12 @@ static void

[PATCH v2 10/10] apply: convert threeway_stage to object_id

2015-03-07 Thread brian m. carlson
Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- builtin/apply.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/builtin/apply.c b/builtin/apply.c index 65b97ee..75c5342 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -208,7 +208,7 @@

[PATCH v2 08/10] commit: convert parts to struct object_id

2015-03-07 Thread brian m. carlson
Convert struct commit_graft and necessary local parts of commit.c. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- commit.c | 32 commit.h | 4 ++-- log-tree.c| 2 +- send-pack.c | 2 +- shallow.c | 8

[PATCH v2 04/10] archive.c: convert to use struct object_id

2015-03-07 Thread brian m. carlson
Convert a hard-coded 20 as well. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- archive.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/archive.c b/archive.c index 96057ed..46d9025 100644 --- a/archive.c +++ b/archive.c @@ -101,7 +101,7

[PATCH v2 02/10] Define utility functions for object IDs.

2015-03-07 Thread brian m. carlson
There are several utility functions (hashcmp and friends) that are used for comparing object IDs (SHA-1 values). Using these functions, which take pointers to unsigned char, with struct object_id requires tiresome access to the sha1 member, which bloats code and violates the desired

[PATCH v2 01/10] Define a structure for object IDs.

2015-03-07 Thread brian m. carlson
Many places throughout the code use unsigned char [20] to store object IDs (SHA-1 values). This leads to lots of hardcoded numbers throughout the codebase. It also leads to confusion about the purposes of a buffer. Introduce a structure for object IDs. This allows us to obtain the benefits of

[PATCH v2 00/10] Use a structure for object IDs.

2015-03-07 Thread brian m. carlson
This is a patch series to convert some of the relevant uses of unsigned char [20] to struct object_id. The goal of this series to improve type-checking in the codebase and to make it easier to move to a different hash function if the project decides to do that. This series does not convert all

Re: Please consider adding a -f switch to git-clone (or something similar)

2015-03-07 Thread Diego Viola
Sorry, I wanted to say: I know I can git-clone in a empty directory and then move the files over to $HOME. I know I can git init in a non-empty directory. :-) Thanks, Diego On Sat, Mar 7, 2015 at 7:26 PM, Andreas Schwab sch...@linux-m68k.org wrote: Diego Viola diego.vi...@gmail.com writes:

[PATCH 1/2] reset: allow - short hand for previous commit

2015-03-07 Thread Sudhanshu Shekhar
Teach reset the same shorthand as checkout and merge. - means the previous commit. Signed-off-by: Sudhanshu Shekhar sudshekha...@gmail.com --- builtin/reset.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/builtin/reset.c b/builtin/reset.c index 4c08ddc..9f8967d

Please consider adding a -f switch to git-clone (or something similar)

2015-03-07 Thread Diego Viola
Hello, I was thinking about creating a new repository in my home dir so that I could keep my dot files in it. However, I found that I can't do a `git clone url:user/repo.git .` in a non-empty directory. Is there a possibility of implementing a -f switch to git-clone so that when I use that, git

Re: Please consider adding a -f switch to git-clone (or something similar)

2015-03-07 Thread Andreas Schwab
Diego Viola diego.vi...@gmail.com writes: I know I could git-init in a empty directory You can also git init a non-empty directory. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for something completely

Re: Delivery Status Notification (Failure)

2015-03-07 Thread Amate Yolande
Hello Junio Thanks for the quick review and I apologize for the poorly constructed code. I am new to open source and git, and that was my first time coming across the git source code so I hoped to submit a working patch first, with the intention of amending it later since I did not

[PATCH] git-instaweb: allow running in a working tree subdirectory

2015-03-07 Thread Kyle J. McKay
Signed-off-by: Kyle J. McKay mack...@gmail.com --- git-instaweb.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-instaweb.sh b/git-instaweb.sh index 513efa66..4c0af04f 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -20,6 +20,7 @@ start start the web server restart

Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-07 Thread karthik nayak
On 03/08/2015 10:08 AM, Eric Sunshine wrote: On Sat, Mar 7, 2015 at 5:49 AM, karthik nayak karthik@gmail.com wrote: This iteration looks sensible, except that the Subject reads strange. Will queue with minor tweaks to the log message, and perhaps with a fix to unreadable *(*argv)[1]

Re: Please consider adding a -f switch to git-clone (or something similar)

2015-03-07 Thread Diego Viola
Something like this is the scenario I'm talking about: $ mkdir non-empty-dir $ cd non-empty-dir $ touch foo bar baz $ git clone -f url:user/dotfiles.git . $ git status On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use git add file... to include in what will

Re: Please consider adding a -f switch to git-clone (or something similar)

2015-03-07 Thread Kyle J. McKay
On Mar 7, 2015, at 17:53, Diego Viola wrote: Something like this is the scenario I'm talking about: $ mkdir non-empty-dir $ cd non-empty-dir $ touch foo bar baz $ git clone -f url:user/dotfiles.git . $ git status On branch master Your branch is up-to-date with 'origin/master'. Untracked files:

Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-07 Thread Eric Sunshine
On Sat, Mar 7, 2015 at 5:49 AM, karthik nayak karthik@gmail.com wrote: This iteration looks sensible, except that the Subject reads strange. Will queue with minor tweaks to the log message, and perhaps with a fix to unreadable *(*argv)[1] that was mentioned elsewhere. Hey could you tell

[PATCH 2/2] help.c: use SHELL_PATH instead of hard-coded /bin/sh

2015-03-07 Thread Kyle J. McKay
If the user has set SHELL_PATH in the Makefile then we should respect that value and use it. Signed-off-by: Kyle J. McKay mack...@gmail.com --- builtin/help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/help.c b/builtin/help.c index 6133fe49..2ae8a1e9 100644 ---

[PATCH 1/2] git-compat-util.h: move SHELL_PATH default into header

2015-03-07 Thread Kyle J. McKay
If SHELL_PATH is not defined we use /bin/sh. However, run-command.c is not the only file that needs to use the default value so move it into a common header. Signed-off-by: Kyle J. McKay mack...@gmail.com --- git-compat-util.h | 4 run-command.c | 4 2 files changed, 4

[PATCH] git-instaweb: use @SHELL_PATH@ instead of /bin/sh

2015-03-07 Thread Kyle J. McKay
If the user has configured a value for SHELL_PATH then be sure to use it for any generated scripts instead of hard-coding /bin/sh. The first line of the script is handled specially, but the embedded #!/bin/sh line in the here document will not be automatically updated unless it uses @SHELL_PATH@.

[PATCH] imap-send: use cURL automatically when NO_OPENSSL defined

2015-03-07 Thread Kyle J. McKay
If both USE_CURL_FOR_IMAP_SEND and NO_OPENSSL are defined do not force the user to add --curl to get a working git imap-send command. Instead automatically select --curl and warn and ignore the --no-curl option. And while we're in there, correct the warning message when --curl is requested but