Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Brian Gesiak
when choosing what to branch off of in the future. On Wed, May 28, 2014 at 6:35 AM, Eric Sunshine wrote: > Etiquette on this list is to avoid top-posting [1]. > ... > If you do re-roll, perhaps consider simplifying the commit messages. Thank you for the tips; very much appreciated. - Br

Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Brian Gesiak
Oomph, how embarrassing. Thanks for pointing that out! Would it be better if I rerolled the patches? - Brian Gesiak On Tue, May 27, 2014 at 12:25 PM, Eric Sunshine wrote: > On Mon, May 26, 2014 at 11:33 AM, Brian Gesiak wrote: >> xcalloc takes two arguments: the number of elements

Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
in mind. Should I reroll the patch based on master? - Brian Gesiak [1] https://github.com/git/git/blob/4a28f169ad29ba452e0e7bea2583914c10c58322/Documentation/SubmittingPatches#L9 On Tue, May 27, 2014 at 8:11 AM, Jeremiah Mahler wrote: > Brian, > > On Tue, May 27, 2014 at 12:33:42AM +090

[PATCH 07/15] hash.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. grow_hash_table passes the arguments in reverse order, passing the size of a hash table entry, followed by the number of entries. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- hash.c | 2

[PATCH 14/15] remote.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. parse_refspec_internal passes the arguments in reverse order, passing the size of a refspec, followed by the number to allocate. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- remote.c | 2

[PATCH 11/15] notes.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. notes.c includes several calls to xcalloc that pass the arguments in reverse order. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- notes.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 09/15] http-push.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. http-push passes the arguments in reverse order, passing the size of a repo, followed by the number to allocate. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- http-push.c | 2 +- 1 file

[PATCH 05/15] config.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. config.c includes several calls to xcalloc that pass the arguments in reverse order: the size of a struct lock_file*, followed by the number to allocate. Rearrgange them so they are in the correct order. Signed-off-by: Brian

[PATCH 10/15] imap-send.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. imap_open_store passes the arguments in reverse order, passing the size of an imap_store*, followed by the number to allocate. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- imap-send.c | 2

[PATCH 15/15] transport-helper.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. transport_helper_init passes the arguments in reverse order, passing the size of a helper_data*, followed by the number to allocate. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- transport

[PATCH 08/15] hash.h: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. prellocate_hash passes the arguments in reverse order, passing the size of a hash table entry, followed by the number of entries. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- hash.h | 2

[PATCH 12/15] pack-revindex.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. init_pack_revindex passes the arguments in reverse order, passing the size of a pack_revindex, followed by the number to allocate. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- pack

[PATCH 03/15] builtin/remote.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. builtin/remote.c includes several calls to xcalloc that pass the arguments in reverse order. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- builtin/remote.c | 8 1 file changed, 4

[PATCH 02/15] builtin/ls-remote.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. cmd_ls_remote passes the arguments in reverse order, passing the size of a char*, followed by the number of char* to be allocated. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- builtin/ls

[PATCH 13/15] reflog-walk.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. reflog-walk.c includes several calls to xcalloc that pass the arguments in reverse order. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- reflog-walk.c | 8 1 file changed, 4

[PATCH 04/15] commit.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. reduce_heads passes the arguments in reverse order, passing the size of a commit*, followed by the number of commit* to be allocated. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- commit.c

[PATCH 06/15] diff.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. diffstat_add passes the arguments in reverse order, passing the size of a diffstat_file*, followed by the number of diffstat_file* to be allocated. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak

[PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. run_add_interactive passes the arguments in reverse order, passing the size of a char*, followed by the number of char* to be allocated. Rearrgange them so they are in the correct order. Signed-off-by: Brian Gesiak --- builtin

[PATCH 00/15] Rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size. The vast majority of the Git codebase passes these arguments in the correct order, but there are some exceptions. This patch series corrects those exceptions. Brian Gesiak (15): builtin/add.c: rearrange xcalloc arguments

[PATCH 2/2] api-strbuf.txt: Add docs for _trim and _ltrim

2014-04-30 Thread Brian Gesiak
API documentation for strbuf does not document strbuf_trim or strbuf_ltrim. Add documentation for these two functions. Signed-off-by: Brian Gesiak --- Documentation/technical/api-strbuf.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/technical/api-strbuf.txt b

[PATCH 1/2] strbuf: Use _rtrim and _ltrim in strbuf_trim

2014-04-30 Thread Brian Gesiak
strbuf_trim strips whitespace from the end, then the beginning of a strbuf. Those operations are duplicated in strbuf_rtrim and strbuf_ltrim. Replace strbuf_trim implementation with calls to strbuf_rtrim, then strbuf_ltrim. Signed-off-by: Brian Gesiak --- This is tangential to my GSoC project

Re: Git in GSoC 2014

2014-04-21 Thread Brian Gesiak
email. I'm also on GitHub[1] and Twitter[2]. [1] https://github.com/modocache [2] https://twitter.com/modocache - Brian Gesiak On Tue, Apr 22, 2014 at 10:06 AM, Andrew Ardill wrote: > Congrats everyone who was successful in being picked for this year's GSoC. > > Fabian with &q

Re: [PATCH] git-rebase: Print name of rev when using shorthand

2014-04-16 Thread Brian Gesiak
same for both cases anyway. I had not originally thought of this, perhaps because I was preoccupied with preventing users from seeing syntax they might not be aware of. But I definitely agree that displaying symbolic names for all "@{-n}" is a good way to prevent user error. > I

[l10n] date: Note for translators not included in .po files

2014-04-16 Thread Brian Gesiak
sit the repository here: https://github.com/modocache/git-po-ja Thanks! - Brian Gesiak -- 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

[PATCH v2] git-rebase: Print name of rev when using shorthand

2014-04-16 Thread Brian Gesiak
parse" to retreive the name of the rev. - Update the tests in light of this new behavior. Requested-by: John Keeping Signed-off-by: Brian Gesiak --- git-rebase.sh | 8 +++- t/t3400-rebase.sh | 4 +--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/git-rebase.sh b/git

Re: [PATCH] git-rebase: Print name of rev when using shorthand

2014-04-16 Thread Brian Gesiak
t be aware of "@{-1}", however, so I'd prefer not to output it as we are currently. Furthermore, were we to translate "@{-1}", does that mean we should also translate "@{-2}" or prior? I don't think that's the case, but then only translating

[PATCH] git-rebase: Print name of rev when using shorthand

2014-04-13 Thread Brian Gesiak
e-rev" to retreive the name of the rev. - Update the tests in light of this new behavior. Requested-by: John Keeping Signed-off-by: Brian Gesiak --- Previous discussion on this issue: http://article.gmane.org/gmane.comp.version-control.git/244340 git-rebase.sh | 2 +- t/t3400-rebase

[PATCH] checkout: Fix grammar in inline comment.

2014-04-12 Thread Brian Gesiak
Inline comment had incorrect grammar. Fix grammatical mistakes and reflect actual behavior of the function. Signed-off-by: Brian Gesiak --- builtin/checkout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 63151e0..abe1161

Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.

2014-03-19 Thread Brian Gesiak
s; checkout informs the user of which branch they have switched to when using the "-" shorthand: "Switched to branch 'master'". Should I submit a new patch, or reroll this one? - Brian Gesiak -- To unsubscribe from this list: send the line "unsubscribe git"

[PATCH v2] git-rebase: Teach rebase "-" shorthand.

2014-03-19 Thread Brian Gesiak
Teach rebase the same shorthand as checkout and merge; that is, that "-" means "the branch we were previously on". Reported-by: Tim Chase Signed-off-by: Brian Gesiak --- git-rebase.sh | 4 t/t3400-rebase.sh | 11 +++ 2 files changed, 15 insertions(

[PATCH] git-rebase: Teach rebase "-" shorthand.

2014-03-18 Thread Brian Gesiak
Teach rebase the same shorthand as checkout and merge; that is, that "-" means "the branch we were previously on". Reported-by: Tim Chase Signed-off-by: Brian Gesiak --- git-rebase.sh | 4 t/t3400-rebase.sh | 6 ++ 2 files changed, 10 insertions(+) diff --g

Re: [GSoC14][RFC] Proposal Draft: Refactor tempfile handling

2014-03-12 Thread Brian Gesiak
dability is probably more difficult than it sounds, but I don't think it's impossible. I'll add some more details on this to my proposal[1]. Thank you! - Brian Gesiak [1] https://www.google-melange.com/gsoc/proposal/review/student/google/gsoc2014/modocache/5629499534213120 -- To u

Re: [GSoC14][RFC] Proposal Draft: Refactor tempfile handling

2014-03-08 Thread Brian Gesiak
ine the cleanup policy. Thanks for all your help so far! - Brian Gesiak PS: I'm maintaining a working draft of my proposal here, in case anyone wants to offer any feedback prior to its submission: https://gist.github.com/modocache/9434914 On Tue, Mar 4, 2014 at 7:42 AM, Jeff King wrote: &

[PATCH] t3200-branch: test setting branch as own upstream

2014-03-04 Thread Brian Gesiak
No test asserts that "git branch -u refs/heads/my-branch my-branch" emits a warning. Add a test that does so. Signed-off-by: Brian Gesiak --- t/t3200-branch.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index fcdb867..e6d4

[GSoC14][RFC] Proposal Draft: Refactor tempfile handling

2014-03-01 Thread Brian Gesiak
Hello all, My name is Brian Gesiak. I'm a research student at the University of Tokyo, and I'm hoping to participate in this year's Google Summer of Code by contributing to Git. I'm a longtime user, first-time contributor--some of you may have noticed my "microproject&quo

Re: [PATCH 3/3] branch: die when setting branch as own upstream

2014-03-01 Thread Brian Gesiak
or all the feedback so far! - Brian Gesiak On Sat, Mar 1, 2014 at 9:23 PM, Brian Gesiak wrote: > Branch set as own upstream using one of the following commands returns > immediately with an exit code of 0: > > - `git branch --set-upstream-to foo refs/heads/foo` > - `git branc

[PATCH 3/3] branch: die when setting branch as own upstream

2014-03-01 Thread Brian Gesiak
. Instead, exit with a status code indicating failure by using the die function. Signed-off-by: Brian Gesiak --- branch.c | 9 ++--- t/t3200-branch.sh | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/branch.c b/branch.c index e163f3c..9bac8b5 100644 --- a/branch.c

[PATCH v2] branch: die when setting branch as own upstream

2014-03-01 Thread Brian Gesiak
misleading. Instead, exit with a status code indicating failure by using the die function. Signed-off-by: Brian Gesiak --- branch.c | 9 ++--- t/t3200-branch.sh | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/branch.c b/branch.c index e163f3c..9bac8b5

Re: [PATCH 1/2] t3200-branch: test setting branch as own upstream

2014-02-28 Thread Brian Gesiak
orkflow this would be included in. In any case, if the jury's out on this one, I suppose the two patches I submitted are good to merge? Part of me thinks the bump from warning to error belongs in its own patch anyway. - Brian Gesiak -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH 1/2] t3200-branch: test setting branch as own upstream

2014-02-28 Thread Brian Gesiak
case? I'm not sure I agree--how is "git branch -f --track foo foo" less erroneous than "git branch -u foo refs/heads/foo"? Perhaps I'm missing some insight on how "--track" is used. The tests appear to already cover all instances in which install_branch_config is

Re: [PATCH 1/2] t3200-branch: test setting branch as own upstream

2014-02-27 Thread Brian Gesiak
uch a change. But as Peff points out it will be a large diff. - Brian Gesiak On Fri, Feb 28, 2014 at 4:26 PM, Jeff King wrote: > On Fri, Feb 28, 2014 at 02:14:01AM -0500, Jeff King wrote: > >> I didn't think we bothered to make "sh -x" work robustly. I don't min

[PATCH v2 2/2] branch: use skip_prefix

2014-02-27 Thread Brian Gesiak
The install_branch_config function reimplemented the skip_prefix function inline. Use skip_prefix function instead for brevity. Reported-by: Michael Haggerty Signed-off-by: Brian Gesiak --- branch.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/branch.c

[PATCH v2 1/2] t3200-branch: test setting branch as own upstream

2014-02-27 Thread Brian Gesiak
No test asserts that "git branch -u refs/heads/my-branch my-branch" emits a warning. Add a test that does so. Signed-off-by: Brian Gesiak --- t/t3200-branch.sh | 8 1 file changed, 8 insertions(+) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index fcdb867..6164126 1007

Re: [PATCH 1/2] t3200-branch: test setting branch as own upstream

2014-02-27 Thread Brian Gesiak
tests to complete. Thanks for pointing that out! Also, sorry if it's in the Makefile somewhere, but is there an easy way to run just a single test file in the t directory? - Brian Gesiak -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to m

[PATCH 2/2] branch: use skip_prefix

2014-02-27 Thread Brian Gesiak
From: modocache The install_branch_config function reimplemented the skip_prefix function inline. Use skip_prefix function instead for brevity. Signed-off-by: Brian Gesiak Reported-by: Michael Haggerty --- branch.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions

[PATCH 1/2] t3200-branch: test setting branch as own upstream

2014-02-27 Thread Brian Gesiak
From: modocache No test asserts that "git branch -u refs/heads/my-branch my-branch" emits a warning. Add a test that does so. Signed-off-by: Brian Gesiak --- t/t3200-branch.sh | 8 1 file changed, 8 insertions(+) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh ind