[PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2014-03-10 Thread Nemina Amarasinghe
Did some simple changing to the chain of if() statements in function install_branch_config() of branch.c This was a micro-project for GSOC 2014 From aebfa60feb643280c89b54e5ab87f9d960cde452 Mon Sep 17 00:00:00 2001 From: Nemina Amarasinghe nemi...@gmail.com Date: Mon, 10 Mar 2014 13:02:55 +0530

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

2014-03-10 Thread Henri GEIST
Le dimanche 09 mars 2014 à 19:24 -0400, Andrew Keller a écrit : On Mar 7, 2014, at 7:50 PM, Henri GEIST wrote: Le vendredi 07 mars 2014 à 15:37 -0800, Junio C Hamano a écrit : Henri GEIST geist.he...@laposte.net writes: This information is technical in nature but has some importance for

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2014-03-10 Thread Nemina Amarasinghe
Nemina Amarasinghe neminaa at gmail.com writes: Sorry for the first patch. Something went wrong. This is the correct one From aebfa60feb643280c89b54e5ab87f9d960cde452 Mon Sep 17 00:00:00 2001 From: Nemina Amarasinghe nemi...@gmail.com Date: Mon, 10 Mar 2014 13:02:55 +0530 Subject: [PATCH]

Re: What's cooking in git.git (Mar 2014, #01; Tue, 4)

2014-03-10 Thread Johannes Sixt
Am 3/5/2014 1:10, schrieb Junio C Hamano: * nd/gitignore-trailing-whitespace (2014-02-10) 2 commits - dir: ignore trailing spaces in exclude patterns - dir: warn about trailing spaces in exclude patterns Warn and then ignore trailing whitespaces in .gitignore files, unless they are

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2014-03-10 Thread Matthieu Moy
Nemina Amarasinghe nemi...@gmail.com writes: Nemina Amarasinghe neminaa at gmail.com writes: Sorry for the first patch. Something went wrong. This is the correct one Please, re-read Documentation/SubmittingPatches. In short, don't inline patch headers and don't forget the sign-off. Subject:

Re: [PATCH/RFC] rebase: new convenient option to edit/reword/delete a single commit

2014-03-10 Thread Michael Haggerty
On 03/09/2014 03:49 AM, Nguyễn Thái Ngọc Duy wrote: Prepare the todo list for you to edit/reword/delete the given commit. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Allowing multiple actions is a bit too much for my shell skills. I don't really need it so I won't push it,

Re: Potential GSOC microproject idea

2014-03-10 Thread Michael Haggerty
On 03/09/2014 02:54 AM, Kyle J. McKay wrote: On Mar 3, 2014, at 23:58, Michael Haggerty wrote: list regulars should FEEL ENCOURAGED to submit microprojects to add to the list. (Either submit them as a pull request to the GitHub repository that contains the text [1] or to the mailing list

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2014-03-10 Thread David Kastrup
Matthieu Moy matthieu@grenoble-inp.fr writes: Nemina Amarasinghe nemi...@gmail.com writes: Nemina Amarasinghe neminaa at gmail.com writes: Sorry for the first patch. Something went wrong. This is the correct one Please, re-read Documentation/SubmittingPatches. In short, don't inline

Re: [PATCH/RFC] rebase: new convenient option to edit/reword/delete a single commit

2014-03-10 Thread Matthieu Moy
Michael Haggerty mhag...@alum.mit.edu writes: @@ -290,6 +294,7 @@ do ;; --autostash) autostash=true +explicit_autosquash=t Should that be explicit_autostash? My guess is: no, but it should be below the --autoquash case, not this one. --

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2014-03-10 Thread Nemina Amarasinghe
Nemina Amarasinghe neminaa at gmail.com writes: Is it me, or is (origin || !origin) a tautology? Thanks for the advices Matthieu. I will go through the documentations again. Is there anything wrong with my logic? What I wanted to express is ((!remote_is_branch origin) ||

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2014-03-10 Thread Matthieu Moy
Nemina Amarasinghe nemi...@gmail.com writes: Nemina Amarasinghe neminaa at gmail.com writes: Is it me, or is (origin || !origin) a tautology? Thanks for the advices Matthieu. I will go through the documentations again. Is there anything wrong with my logic? What I wanted to express

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2014-03-10 Thread David Kastrup
Nemina Amarasinghe nemi...@gmail.com writes: Nemina Amarasinghe neminaa at gmail.com writes: Is it me, or is (origin || !origin) a tautology? Thanks for the advices Matthieu. I will go through the documentations again. Is there anything wrong with my logic? What I wanted to express

Re: [PATCH] submodule : Add --no-separate-git-dir option to add and update command.

2014-03-10 Thread Henri GEIST
Le samedi 08 mars 2014 à 00:00 +0100, Jens Lehmann a écrit : Am 06.03.2014 23:20, schrieb Henri GEIST: Le jeudi 06 mars 2014 à 21:51 +0100, Jens Lehmann a écrit : Am 06.03.2014 21:15, schrieb Henri GEIST: Le jeudi 06 mars 2014 à 20:48 +0100, Jens Lehmann a écrit : Am 06.03.2014 02:25,

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2014-03-10 Thread Nemina Amarasinghe
((!remote_is_branch origin) || (!remote_is_branch || !origin)) Is it? The above is the same as (!remote_is_branch || !origin). What you wrote before is the same as (!remote_is_branch). Maybe you should try copypaste from the expressions you are trying to combine to make sure that

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2014-03-10 Thread David Kastrup
Nemina Amarasinghe nemi...@gmail.com writes: ((!remote_is_branch origin) || (!remote_is_branch || !origin)) Is it? The above is the same as (!remote_is_branch || !origin). What you wrote before is the same as (!remote_is_branch). Maybe you should try copypaste from the expressions

Re: howto to run git without a master branch

2014-03-10 Thread Andreas Schwab
Ilya Bobyr ilya.bo...@gmail.com writes: There is a git remote set-head to manipulate HEAD in a remote repository. This is misleading. The command does nothing on the remote side, it only changes the refs/remote namespace in your repository. The purpose is to change what branch the ref

question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread Dennis Luehring
according to these blog posts http://www.infoq.com/news/2014/01/facebook-scaling-hg https://code.facebook.com/posts/218678814984400/scaling-mercurial-at-facebook/ mercurial can be faster then git but i don't found any reply from the git community if it is a real problem or if there a ongoing

Re: question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread David Lang
On Mon, 10 Mar 2014, Dennis Luehring wrote: according to these blog posts http://www.infoq.com/news/2014/01/facebook-scaling-hg https://code.facebook.com/posts/218678814984400/scaling-mercurial-at-facebook/ mercurial can be faster then git but i don't found any reply from the git community

Accidentially deleted directory, bug in git clean -d?

2014-03-10 Thread Robin Pedersen
I accidentially deleted a directory using git clean. I would think this is a bug, but I'm not sure. Was using 1.8.1, but upgraded to 1.9.0 just to see if it was still reproducable, and it was. Here's a minimal way to reproduce: $ git init $ mkdir foo foobar $ git clean -df foobar Removing foo/

[RFC/WIP] Pluggable reference backends

2014-03-10 Thread Michael Haggerty
I have started working on pluggable ref backends. In this email I would like to share my plans and solicit feedback. (This morning I removed this project from the GSoC ideas page, because it is unfair to ask a student to shoot at a moving target.) Why? Currently, the reference- and

Re: question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread demerphq
On 10 March 2014 11:07, Dennis Luehring dl.so...@gmx.net wrote: according to these blog posts http://www.infoq.com/news/2014/01/facebook-scaling-hg https://code.facebook.com/posts/218678814984400/scaling-mercurial-at-facebook/ mercurial can be faster then git but i don't found any reply

Re: question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread Dennis Luehring
Am 10.03.2014 12:28, schrieb demerphq: I had the impression, and I would not be surprised if they had the impression that the git development community is relatively unconcerned about performance issues on larger repositories. so the question is if the git community is interested in beeing

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread Johan Herland
On Mon, Mar 10, 2014 at 12:00 PM, Michael Haggerty mhag...@alum.mit.edu wrote: I have started working on pluggable ref backends. In this email I would like to share my plans and solicit feedback. No comments or useful feedback yet, except that I enthusiastically approve of the objective and

Re: question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread Johan Herland
On Mon, Mar 10, 2014 at 12:42 PM, Dennis Luehring dl.so...@gmx.net wrote: Am 10.03.2014 12:28, schrieb demerphq: I had the impression, and I would not be surprised if they had the impression that the git development community is relatively unconcerned about performance issues on larger

[PATCH 06/26] refs.h: Rename the action_on_err constants

2014-03-10 Thread Michael Haggerty
Given that these constants are only being used when updating references, it is inappropriate to give them such generic names as DIE_ON_ERR. So prefix their names with UPDATE_REFS_. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- builtin/checkout.c | 2 +-

[PATCH 04/26] parse_arg(): Really test that argument is properly terminated

2014-03-10 Thread Michael Haggerty
Add a docstring to the function incorporating the comments that were formerly within the function plus some added information. Test that the argument is properly terminated by either whitespace or a NUL character, even if it is quoted, to be consistent with the non-quoted case. Adjust the tests

[PATCH 01/26] t1400: Fix name and expected result of one test

2014-03-10 Thread Michael Haggerty
The test stdin -z create ref fails with zero new value actually passes an empty new value, not a zero new value. So rename the test s/zero/empty/, and change the expected error from fatal: create $c given zero new value to fatal: create $c missing newvalue Of course, this makes

[PATCH 00/26] Clean up update-refs --stdin and implement ref_transaction

2014-03-10 Thread Michael Haggerty
I just sent an email to the list [1] describing how I want to decouple reference-handling code from the rest of Git, and implement pluggable reference storage backends. This patch series is the first movement in that direction. update_refs() and update-ref --stdin implement the beginning of

[PATCH 19/26] refs: Remove API function update_refs()

2014-03-10 Thread Michael Haggerty
This should be done via reference transactions now. This also means that struct ref_update can become private. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 31 --- refs.h | 20 2 files changed, 20 insertions(+), 31

[PATCH 18/26] update-ref --stdin: Reimplement using reference transactions

2014-03-10 Thread Michael Haggerty
This change is mostly clerical: the parse_cmd_*() functions need to use local variables rather than a struct ref_update to collect the arguments needed for each update, and then call queue_*_ref() to queue the change rather than building up the list of changes at the caller side. Signed-off-by:

[PATCH 11/26] update-ref --stdin: Improve error messages for invalid values

2014-03-10 Thread Michael Haggerty
If an invalid value is passed to update-ref --stdin as oldvalue or newvalue, include the command and the name of the reference at the beginning of the error message. Update the tests accordingly. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- builtin/update-ref.c | 24

[PATCH 08/26] update-ref --stdin: Read the whole input at once

2014-03-10 Thread Michael Haggerty
Decouple the parsing code from the input source (the old parsing code had to read new data even in the middle of commands). This might also be a tad faster, but that is inconsequential. Add docstrings for the parsing functions. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu ---

[PATCH 15/26] update-ref --stdin: Improve the error message for unexpected EOF

2014-03-10 Thread Michael Haggerty
Distinguish this error from the error that an argument is missing for another reason. Update the tests accordingly. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- builtin/update-ref.c | 4 ++-- t/t1400-update-ref.sh | 10 +- 2 files changed, 7 insertions(+), 7 deletions(-)

[PATCH 13/26] update-ref --stdin: Simplify error messages for missing oldvalues

2014-03-10 Thread Michael Haggerty
Instead of, for example, fatal: update refs/heads/master missing [oldvalue] NUL emit fatal: update refs/heads/master missing oldvalue Update the tests accordingly. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- builtin/update-ref.c | 6 +++--- t/t1400-update-ref.sh | 6

[PATCH 02/26] t1400: Provide sensible input to the command

2014-03-10 Thread Michael Haggerty
The old version was passing (among other things) update SP refs/heads/c NUL NUL 0{40} NUL to git update-ref -z --stdin to test whether the old-value check for c is working. But the newvalue is empty, which is not allowed for the update command. So, to be sure that we are testing what we

[PATCH 12/26] update-ref --stdin: Make error messages more consistent

2014-03-10 Thread Michael Haggerty
The old error messages emitted for invalid input sometimes said oldvalue/newvalue and sometimes said old value/new value. Convert them all to the former. Update the tests accordingly. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- builtin/update-ref.c | 8

[PATCH 17/26] refs: Add a concept of a reference transaction

2014-03-10 Thread Michael Haggerty
Build out the API for dealing with a bunch of reference checks and changes within a transaction. Define an opaque ref_transaction type that is managed entirely within refs.c. Introduce functions for starting a transaction, adding updates to a transaction, and committing a transaction. This API

[PATCH 14/26] update-ref.c: Extract a new function, parse_next_sha1()

2014-03-10 Thread Michael Haggerty
Replace three functions, update_store_new_sha1(), update_store_old_sha1(), and parse_next_arg(), with a single function, parse_next_sha1(). The new function takes care of a whole argument, including checking whether it is there, converting it to an SHA-1, and emitting errors on EOF or for invalid

[PATCH 22/26] commit_ref_transaction(): Introduce temporary variables

2014-03-10 Thread Michael Haggerty
Use temporary variables in the for-loop blocks to simplify expressions in the rest of the loop. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/refs.c b/refs.c index 335d0e2..ec638e9

[PATCH 26/26] commit_ref_transaction(): Work with transaction-updates in place

2014-03-10 Thread Michael Haggerty
Now that we free the transaction when we are done, there is no need to make a copy of transaction-updates before working with it. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/refs.c b/refs.c index

[PATCH 05/26] t1400: Add some more tests involving quoted arguments

2014-03-10 Thread Michael Haggerty
Previously there were no good tests of C-quoted arguments. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- t/t1400-update-ref.sh | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index

[PATCH 10/26] update-ref.c: Extract a new function, parse_refname()

2014-03-10 Thread Michael Haggerty
There is no reason to obscure the fact that parse_first_arg() always parses refnames. Form the new function by combining parse_first_arg() and update_store_ref_name(). Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- builtin/update-ref.c | 90

[PATCH 07/26] update_refs(): Fix constness

2014-03-10 Thread Michael Haggerty
Since full const correctness is beyond the ability of C's type system, just put the const where it doesn't do any harm. A (struct ref_update **) can be passed to a (struct ref_update * const *) argument, but not to a (const struct ref_update **) argument. Signed-off-by: Michael Haggerty

[PATCH 20/26] struct ref_update: Rename field ref_name to refname

2014-03-10 Thread Michael Haggerty
This is consistent with the usual nomenclature. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 18 +- refs.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/refs.c b/refs.c index 91af0a0..5d08cdf 100644 --- a/refs.c +++ b/refs.c @@

[PATCH 09/26] parse_cmd_verify(): Copy old_sha1 instead of evaluating oldvalue twice

2014-03-10 Thread Michael Haggerty
Aside from avoiding work, this makes it transparently obvious that old_sha1 and new_sha1 are identical. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- builtin/update-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/update-ref.c b/builtin/update-ref.c

[PATCH 16/26] update-ref --stdin: Harmonize error messages

2014-03-10 Thread Michael Haggerty
Make (most of) the error messages for invalid input have the same format [1]: $COMMAND [SP $REFNAME]: $MESSAGE Update the tests accordingly. [1] A few error messages still have their old form, because $COMMAND and $REFNAME aren't passed all the way down the call stack. Signed-off-by:

[PATCH 25/26] commit_ref_transaction(): Also free the ref_transaction

2014-03-10 Thread Michael Haggerty
Change commit_ref_transaction() to also free the associated data, to absolve the caller from having to do it. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- builtin/update-ref.c | 1 - refs.c | 1 + refs.h | 11 ++- 3 files changed, 7

[PATCH 24/26] struct ref_update: Add type field

2014-03-10 Thread Michael Haggerty
This is temporary space for commit_ref_transaction() Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/refs.c b/refs.c index 73aec88..1fd38b0 100644 --- a/refs.c +++ b/refs.c @@ -3279,6 +3279,7 @@ struct

[PATCH 03/26] t1400: Pass a legitimate newvalue to update command

2014-03-10 Thread Michael Haggerty
This test is trying to test a few ways to delete references using git update-ref -z --stdin. The third line passed in is update SP /refs/heads/c NUL NUL sha1 NUL , which is not a correct way to delete a reference according to the documentation (the new value should be zeros, not empty).

Re: [PATCH v2 2/2] i18n: assure command not corrupted by _() process

2014-03-10 Thread Sandy Carter
Is there any update on this patch? Le 2014-03-03 09:55, Sandy Carter a écrit : Separate message from command examples to avoid translation issues such as a dash being omitted in a translation. Signed-off-by: Sandy Carter sandy.car...@savoirfairelinux.com --- builtin/branch.c | 10 ++

Re: git merge --date --author

2014-03-10 Thread Yann Droneaud
Hi, Le vendredi 07 mars 2014 à 11:43 -0800, Junio C Hamano a écrit : Andreas Schwab sch...@linux-m68k.org writes: Yann Droneaud ydrone...@opteya.com writes: But I'd like to know if there's a specific reason for git merge to not support --date and --author ? It's rather unusual that

[PATCH 21/26] struct ref_update: Store refname as a FLEX_ARRAY.

2014-03-10 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/refs.c b/refs.c index 5d08cdf..335d0e2 100644 --- a/refs.c +++ b/refs.c @@ -3274,11 +3274,11 @@ static int update_ref_write(const char *action, const

[PATCH 23/26] struct ref_update: Add a lock member

2014-03-10 Thread Michael Haggerty
Now that we manage ref_update objects internally, we can use them to hold some of the scratch space we need when actually carrying out the updates. Store the (struct ref_lock *) there. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 32 1 file

Re: [PATCH 05/26] t1400: Add some more tests involving quoted arguments

2014-03-10 Thread Johan Herland
On Mon, Mar 10, 2014 at 1:46 PM, Michael Haggerty mhag...@alum.mit.edu wrote: Previously there were no good tests of C-quoted arguments. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu FWIW, the first 5 patches seem trivially correct to me. Feel free to add: Reviewed-by: Johan Herland

Re: question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread Karsten Blees
Am 10.03.2014 12:42, schrieb Dennis Luehring: Am 10.03.2014 12:28, schrieb demerphq: I had the impression, and I would not be surprised if they had the impression that the git development community is relatively unconcerned about performance issues on larger repositories. so the question is

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread Shawn Pearce
On Mon, Mar 10, 2014 at 4:00 AM, Michael Haggerty mhag...@alum.mit.edu wrote: I have started working on pluggable ref backends. In this email I would like to share my plans and solicit feedback. Yay! JGit already has pluggable ref backends, so it is good to see this starting in git-core.

Re: question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread Michael Haggerty
On 03/10/2014 01:10 PM, Johan Herland wrote: It should be possible to teach Git to do similar things, and IINM there are (and have previously been) several attempts to do similar things in Git, e.g.: - http://thread.gmane.org/gmane.comp.version-control.git/240339 -

Re: Trust issues with hooks and config files

2014-03-10 Thread Junio C Hamano
Julian Brost jul...@0x4a42.net writes: On 07.03.2014 22:04, Jeff King wrote: If you want to work on it, I think it's an interesting area. But any development would need to think about the transition plan for existing sites that will be broken. I can understand the problem with backward

Re: [PATCH v3] upload-pack: send shallow info over stdin to pack-objects

2014-03-10 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Sat, Mar 8, 2014 at 1:27 AM, Junio C Hamano gits...@pobox.com wrote: On the receive-pack side, the comment at the bottom of preprare_shallow_update() makes it clear that, if we wanted to use hooks, we cannot avoid having the proposed new shallow-file in

Re: [PATCH v7 00/11] Add interpret-trailers builtin

2014-03-10 Thread Junio C Hamano
Øystein Walle oys...@gmail.com writes: Junio C Hamano gitster at pobox.com writes: ... is easier to read and maintain if written like so (with using HT properly---our MUAs may damage it and turn the indentation into spaces): ... sed -e s/ Z$/ / expect -\EOF

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

2014-03-10 Thread Junio C Hamano
Andrew Keller and...@kellerfarm.com writes: On Mar 7, 2014, at 7:50 PM, Henri GEIST wrote: ... To give one of my project to someone else I have copied it on a USB key. By a simple drag and drop with the mouse. And I am quite sure I am not alone doing this way. I have done those kind of

Re: [GSoC][PATCH v2] use strchrnul() in place of strchr() and strlen()

2014-03-10 Thread Junio C Hamano
Rohit Mani rohit.m...@outlook.com writes: Avoid scanning strings twice, once with strchr() and then with strlen(), by using strchrnul(). Thanks. The patch looks good. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread Max Horn
On 10.03.2014, at 15:30, Shawn Pearce spea...@spearce.org wrote: On Mon, Mar 10, 2014 at 4:00 AM, Michael Haggerty mhag...@alum.mit.edu wrote: I have started working on pluggable ref backends. In this email I would like to share my plans and solicit feedback. Yay! Yay, too! JGit

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread Jeff King
On Mon, Mar 10, 2014 at 07:30:45AM -0700, Shawn Pearce wrote: * Store references in a SQLite database, to get correct transaction handling. No to SQLLite in git-core. Using it from JGit requires building SQLLite and a JNI wrapper, which makes JGit significantly less portable. I know

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread David Kastrup
Jeff King p...@peff.net writes: On Mon, Mar 10, 2014 at 07:30:45AM -0700, Shawn Pearce wrote: * Store references in a SQLite database, to get correct transaction handling. No to SQLLite in git-core. Using it from JGit requires building SQLLite and a JNI wrapper, which makes JGit

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread David Lang
On Mon, 10 Mar 2014, David Kastrup wrote: Jeff King p...@peff.net writes: On Mon, Mar 10, 2014 at 07:30:45AM -0700, Shawn Pearce wrote: * Store references in a SQLite database, to get correct transaction handling. No to SQLLite in git-core. Using it from JGit requires building SQLLite

Re: [PATCH 03/26] t1400: Pass a legitimate newvalue to update command

2014-03-10 Thread Brad King
On 03/10/2014 08:46 AM, Michael Haggerty wrote: This test is trying to test a few ways to delete references using git update-ref -z --stdin. The third line passed in is update SP /refs/heads/c NUL NUL sha1 NUL , which is not a correct way to delete a reference according to the

Re: [PATCH 13/26] update-ref --stdin: Simplify error messages for missing oldvalues

2014-03-10 Thread Brad King
On 03/10/2014 01:08 PM, Brad King wrote: -die(update %s missing [oldvalue] NUL, update-ref_name); +die(update %s missing oldvalue, update-ref_name); The reason for the original wording is that the oldvalue is indeed optional. This can only occur at end-of-input, and

Re: [PATCH 13/26] update-ref --stdin: Simplify error messages for missing oldvalues

2014-03-10 Thread Brad King
On 03/10/2014 08:46 AM, Michael Haggerty wrote: Instead of, for example, fatal: update refs/heads/master missing [oldvalue] NUL emit fatal: update refs/heads/master missing oldvalue [snip] - die(update %s missing [oldvalue] NUL, update-ref_name); +

[PATCH] clean: respect pathspecs with -d

2014-03-10 Thread Jeff King
git-clean uses read_directory to fill in a `struct dir` with potential hits. However, read_directory does not actually check against our pathspec. It uses a simplified version that may turn up false positives. As a result, we need to check that any hits match our pathspec. We do so reliably for

Re: [PATCH] clean: respect pathspecs with -d

2014-03-10 Thread Jeff King
On Mon, Mar 10, 2014 at 01:20:02PM -0400, Jeff King wrote: On Mon, Mar 10, 2014 at 11:31:37AM +0100, Robin Pedersen wrote: I accidentially deleted a directory using git clean. I would think this is a bug, but I'm not sure. Was using 1.8.1, but upgraded to 1.9.0 just to see if it was

[PATCH] clean: simplify dir/not-dir logic

2014-03-10 Thread Jeff King
On Mon, Mar 10, 2014 at 01:20:02PM -0400, Jeff King wrote: git-clean uses read_directory to fill in a `struct dir` with potential hits. However, read_directory does not actually check against our pathspec. It uses a simplified version that may turn up false positives. As a result, we need to

Re: [PATCH 00/26] Clean up update-refs --stdin and implement ref_transaction

2014-03-10 Thread Brad King
Hi Michael, This is excellent work. I haven't reviewed every line of logic in detail but the changes look correct at a high level. The only exception is that the empty newvalue is supposed to be accepted and treated as zero even in --stdin -z mode. See my response to that individual change.

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Mar 10, 2014 at 07:30:45AM -0700, Shawn Pearce wrote: * Store references in a SQLite database, to get correct transaction handling. No to SQLLite in git-core. Using it from JGit requires building SQLLite and a JNI wrapper, which makes JGit

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread Jeff King
On Mon, Mar 10, 2014 at 10:46:01AM -0700, Junio C Hamano wrote: No to SQLLite in git-core. Using it from JGit requires building SQLLite and a JNI wrapper, which makes JGit significantly less portable. I know SQLLite is pretty amazing, but implementing compatibility with it from JGit will

Re: question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread David Lang
On Mon, 10 Mar 2014, Ondřej Bílka wrote: On Mon, Mar 10, 2014 at 03:13:45AM -0700, David Lang wrote: On Mon, 10 Mar 2014, Dennis Luehring wrote: according to these blog posts http://www.infoq.com/news/2014/01/facebook-scaling-hg

Re: question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread Ondřej Bílka
On Mon, Mar 10, 2014 at 03:13:45AM -0700, David Lang wrote: On Mon, 10 Mar 2014, Dennis Luehring wrote: according to these blog posts http://www.infoq.com/news/2014/01/facebook-scaling-hg https://code.facebook.com/posts/218678814984400/scaling-mercurial-at-facebook/ mercurial can be

[PATCH 5/7] merge: fix GIT_EDITOR override for commit hook

2014-03-10 Thread Benoit Pierre
Don't set GIT_EDITOR to : when calling prepare-commit-msg hook if the editor is going to be called (e.g. with merge -e). Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- builtin/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/merge.c b/builtin/merge.c

[PATCH 7/7] run-command: mark run_hook_with_custom_index as deprecated

2014-03-10 Thread Benoit Pierre
--- run-command.h | 1 + 1 file changed, 1 insertion(+) diff --git a/run-command.h b/run-command.h index 88460f9..3653bfa 100644 --- a/run-command.h +++ b/run-command.h @@ -51,6 +51,7 @@ extern int run_hook_le(const char *const *env, const char *name, ...); extern int run_hook_ve(const char

[PATCH 2/7] merge hook tests: use 'test_must_fail' instead of '!'

2014-03-10 Thread Benoit Pierre
Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- t/t7505-prepare-commit-msg-hook.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh index 1c95652..5531abb 100755 ---

[PATCH V2 0/7] fix hunk editing with 'commit -p -m'

2014-03-10 Thread Benoit Pierre
This patch fixes the fact that hunk editing with 'commit -p -m' does not work: GIT_EDITOR is set to ':' to indicate to hooks that no editor will be launched, which result in the 'hunk edit' option not launching the editor (and selecting the whole hunk). The fix consists in deferring the

[PATCH 6/7] merge hook tests: fix and update tests

2014-03-10 Thread Benoit Pierre
- update 'no editor' hook test and add 'editor' hook test - make sure the tree is reset to a clean state after running a test (using test_when_finished) so later tests are not impacted Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- t/t7505-prepare-commit-msg-hook.sh | 27

[PATCH 3/7] test patch hunk editing with commit -p -m

2014-03-10 Thread Benoit Pierre
Add (failing) test: with commit changing the environment to let hooks now that no editor will be used (by setting GIT_EDITOR to :), the edit hunk functionality does not work (no editor is launched and the whole hunk is committed). Signed-off-by: Benoit Pierre benoit.pie...@gmail.com ---

[PATCH 4/7] commit: fix patch hunk editing with commit -p -m

2014-03-10 Thread Benoit Pierre
Don't change git environment: move the GIT_EDITOR=: override to the hook command subprocess, like it's already done for GIT_INDEX_FILE. Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- builtin/checkout.c| 8 +++ builtin/clone.c | 4 ++--

[PATCH 1/7] merge hook tests: fix missing '' in test

2014-03-10 Thread Benoit Pierre
Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- t/t7505-prepare-commit-msg-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh index 3573751..1c95652 100755 ---

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

2014-03-10 Thread Henri GEIST
Le lundi 10 mars 2014 à 08:31 -0700, Junio C Hamano a écrit : Andrew Keller and...@kellerfarm.com writes: On Mar 7, 2014, at 7:50 PM, Henri GEIST wrote: ... To give one of my project to someone else I have copied it on a USB key. By a simple drag and drop with the mouse. And I am

[PATCH][GSOC2014] changed logical chain in branch.c to lookup tables

2014-03-10 Thread TamerTas
Signed-off-by: TamerTas tamer...@outlook.com --- branch.c | 31 --- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/branch.c b/branch.c index 723a36b..397edd3 100644 --- a/branch.c +++ b/branch.c @@ -50,6 +50,9 @@ static int should_setup_rebase(const

[PATCH][GSOC2014]

2014-03-10 Thread TamerTas
I inspected branch.c:install_branch_config() and since the conditionals cover all the possibilities, I decided that making the code table-driven would be much cleaner and shorter. I've ran the tests and they all passed. Reimplementation using git am also didn't have any problems. Please let me

[PATCH 1/2] status: allow NULL fmt for status_printf/status_vprintf_ln

2014-03-10 Thread Benoit Pierre
Useful for calling status_printf only to change/reset the color (and output an additional '\n' with status_vprintf_ln). Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- wt-status.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wt-status.c b/wt-status.c index

[PATCH 0/2] fix status_printf_ln calls zero-length format warnings

2014-03-10 Thread Benoit Pierre
Those happens with gcc -Wformat-zero-length. Since passing NULL does not generate a warning (as __attribute__((printf())) does not imply nonull), modify status_printf/status_printf_ln to allow a NULL format and update calls with an empty string. Benoit Pierre (2): status: allow NULL fmt for

[PATCH 2/2] fix status_printf_ln calls zero-length format warnings

2014-03-10 Thread Benoit Pierre
Those happens with gcc -Wformat-zero-length. Change empty strings to NULL now that it's allowed. Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- builtin/commit.c | 2 +- wt-status.c | 20 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

2014-03-10 Thread Junio C Hamano
Henri GEIST geist.he...@laposte.net writes: Le lundi 10 mars 2014 à 08:31 -0700, Junio C Hamano a écrit : ... This is not limited to submodules. There are multiple lower-level mechanisms for a $path/.git to borrow the repository data from elsewhere outside of $path and a cloned submodule

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread Jeff King
On Mon, Mar 10, 2014 at 05:14:02PM +0100, David Kastrup wrote: [storing refs in sqlite] Of course, the basic premise for this feature is let's assume that our file and/or operating system suck at providing file system functionality at file name granularity. There have been two historically

Re: [PATCH] rebase: new option to post edit a squashed or fixed up commit

2014-03-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: After squashing or fixing up, you may want to have a final look at the commit, edit some more if needed or even do some testing. --postedit enables that. This is (to me) a paranoid mode so either I enable it for all squashes and fixups, or none.

Re: [PATCH 0/2] fix status_printf_ln calls zero-length format warnings

2014-03-10 Thread Jeff King
On Mon, Mar 10, 2014 at 08:27:25PM +0100, Benoit Pierre wrote: Those happens with gcc -Wformat-zero-length. Since passing NULL does not generate a warning (as __attribute__((printf())) does not imply nonull), modify status_printf/status_printf_ln to allow a NULL format and update calls with

Re: [PATCH] rev-parse --parseopt: option argument name hints

2014-03-10 Thread Junio C Hamano
Ilya Bobyr ilya.bo...@gmail.com writes: On 3/4/2014 11:22 AM, Junio C Hamano wrote: Ilya Bobyr ilya.bo...@gmail.com writes: @@ -333,6 +339,7 @@ h,helpshow the help foo some nifty option --foo bar= some cool option --bar with an argument +baz=arg another cool option

Re: [RFC/WIP] Pluggable reference backends

2014-03-10 Thread David Kastrup
Jeff King p...@peff.net writes: On Mon, Mar 10, 2014 at 05:14:02PM +0100, David Kastrup wrote: [storing refs in sqlite] Of course, the basic premise for this feature is let's assume that our file and/or operating system suck at providing file system functionality at file name granularity.

Re: What's cooking in git.git (Mar 2014, #01; Tue, 4)

2014-03-10 Thread Junio C Hamano
Johannes Sixt j.s...@viscovery.net writes: Am 3/5/2014 1:10, schrieb Junio C Hamano: * nd/gitignore-trailing-whitespace (2014-02-10) 2 commits - dir: ignore trailing spaces in exclude patterns - dir: warn about trailing spaces in exclude patterns Warn and then ignore trailing

Re: [PATCH] clean: respect pathspecs with -d

2014-03-10 Thread Simon Ruderich
On Mon, Mar 10, 2014 at 01:22:15PM -0400, Jeff King wrote: +test_expect_success 'git clean -d respects pathspecs' ' + mkdir foo + mkdir foobar + git clean -df foobar + test_path_is_dir foo + test_path_is_missing foobar +' + test_done I think we should also test

Re: [PATCH 4/7] commit: fix patch hunk editing with commit -p -m

2014-03-10 Thread Jeff King
On Mon, Mar 10, 2014 at 07:49:34PM +0100, Benoit Pierre wrote: Don't change git environment: move the GIT_EDITOR=: override to the hook command subprocess, like it's already done for GIT_INDEX_FILE. Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- builtin/checkout.c

  1   2   >