[PATCH/RFCv5 1/3] git-rebase -i: add command drop to remove a commit

2015-06-10 Thread Galan Rémi
Instead of removing a line to remove the commit, you can use the command drop (just like pick or edit). It has the same effect as deleting the line (removing the commit) except that you keep a visual trace of your actions, allowing a better control and reducing the possibility of removing a commit

[PATCH/RFCv5 2/3] git rebase -i: warn about removed commits

2015-06-10 Thread Galan Rémi
Check if commits were removed (i.e. a line was deleted) and print warnings or stop git rebase depending on the value of the configuration variable rebase.missingCommitsCheck. This patch gives the user the possibility to avoid silent loss of information (losing a commit through deleting the line

[PATCH/RFCv5 3/3] git rebase -i: add static check for commands and SHA-1

2015-06-10 Thread Galan Rémi
Check before the start of the rebasing if the commands exists, and for the commands expecting a SHA-1, check if the SHA-1 is present and corresponds to a commit. In case of error, print the error, stop git rebase and prompt the user to fix with 'git rebase --edit-todo' or to abort. This allows to

Re: [PATCH 2/8] sha1_file: introduce has_object_file helper.

2015-06-10 Thread Duy Nguyen
On Tue, Jun 9, 2015 at 11:28 PM, brian m. carlson sand...@crustytoothpaste.net wrote: diff --git a/sha1_file.c b/sha1_file.c index 7e38148..09f7f03 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -3173,6 +3173,11 @@ int has_sha1_file(const unsigned char *sha1) return

Re: [RFC/PATCH 3/9] for-each-ref: add '--points-at' option

2015-06-10 Thread Karthik Nayak
On 06/10/2015 01:09 PM, Matthieu Moy wrote: Junio C Hamano gits...@pobox.com writes: Don't do that. Always start your function like so: type funcname(args) { declarations; first statement; ... Hint: create a file config.mak with this

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-10 Thread Louis-Alexandre Stuber
That is very different from ENOENT, which is an expected error when you are not using a customized terms. But in the current state, we are going to create bisect_terms even if the bisection is in bad/good mode. Should we differentiate the erors then ? and should we abort the bisection instead

[PATCHv3 1/4] git-p4: additional testing of --changes-block-size

2015-06-10 Thread Luke Diamand
Add additional tests of some corner-cases of the --changes-block-size git-p4 parameter. Also reduce the number of p4 changes created during the tests, so that they complete faster. Signed-off-by: Luke Diamand l...@diamand.org Acked-by: Lex Spoon l...@lexspoon.org --- t/t9818-git-p4-block.sh |

[PATCHv3 0/4] git-p4: fixing --changes-block-size handling

2015-06-10 Thread Luke Diamand
This series of patches teaches git-p4 to break up calls to the P4 server into smaller chunks, to avoid hitting the maxresults and maxscanrows server-side limits. The previous iteration of this series didn't handle non-integer P4 revision ranges (e.g. //depot/...@2014/1/1,2015/1/1). This version

[PATCHv3 3/4] git-p4: add tests for non-numeric revision range

2015-06-10 Thread Luke Diamand
Test that git-p4 can handle a sync with a non-numeric revision range (e.g. a date). Signed-off-by: Luke Diamand l...@diamand.org --- t/t9800-git-p4-basic.sh | 38 ++ 1 file changed, 38 insertions(+) diff --git a/t/t9800-git-p4-basic.sh

[PATCHv3 4/4] git-p4: fixing --changes-block-size handling

2015-06-10 Thread Luke Diamand
The --changes-block-size handling was intended to help when a user has a limited maxscanrows (see p4 group). It used p4 changes -m $maxchanges to limit the number of results. Unfortunately, it turns out that the maxscanrows and maxresults limits are actually applied *before* the -m maxchanges

[PATCHv3 2/4] git-p4: test with limited p4 server results

2015-06-10 Thread Luke Diamand
Change the --changes-block-size git-p4 test to use an account with limited maxresults and maxscanrows values. These conditions are applied in the server *before* the -m maxchanges parameter to p4 changes is applied, and so the strategy that git-p4 uses for limiting the number of changes does not

Re: [PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses

2015-06-10 Thread Matthieu Moy
Nothing serious, but you did something weird while sending. This message does not have a References: or an In-reply-to: field, so it breaks threading. See how it's displayed on http://thread.gmane.org/gmane.comp.version-control.git Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes:

git difftool is not working as expected during MERGING

2015-06-10 Thread Bossert, Andre
Hello, i've tested git difftool with -t --ext-cmd and other options to see my diff with external tools, but it always show internal text-diff in console. The same tests with git mergetool working as expected. I've compared (nanually reviewed) git-mergetool.sh with git-difftool.pl and see that

Re: On undoing a forced push

2015-06-10 Thread brian m. carlson
On Wed, Jun 10, 2015 at 09:43:34AM +0700, Duy Nguyen wrote: On Tue, Jun 9, 2015 at 10:00 PM, brian m. carlson sand...@crustytoothpaste.net wrote: You've increased this by 20, but you're adding 40 characters to the strcpy. Are you sure that's enough? Also, you might consider writing this

Re: [RFC/PATCH 3/9] for-each-ref: add '--points-at' option

2015-06-10 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Don't do that. Always start your function like so: type funcname(args) { declarations; first statement; ... Hint: create a file config.mak with this content: $ cat config.mak CFLAGS +=

Re: [PATCH 2/4] bisect: replace hardcoded bad|good by variables

2015-06-10 Thread Matthieu Moy
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: - - fprintf(stderr, The merge base %s is bad.\n - This means the bug has been fixed - between %s and [%s].\n, - bad_hex, bad_hex, good_hex); - + if (!strcmp(name_bad, bad)) { + fprintf(stderr, The merge base %s is

Re: [PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-10 Thread Matthieu Moy
Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes: As alias file formats supported by git send-email doesn't take whitespace into account, it is useless to consider whitespaces in alias name. remove leading and trailing whitespace before expanding s/remove/Remove/ allow to

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-10 Thread Louis-Alexandre Stuber
But ENOENT is not a normal case at all. Should we not treat it the same way as other fopen() errors ? (either going on with default case or returning an error) Would : if (!fp) { die(could not read file '%s': %s, filename,

Re: [PATCH v2 02/19] parse-options-cb: implement parse_opt_pass_argv_array()

2015-06-10 Thread Paul Tan
On Wed, Jun 10, 2015 at 7:16 AM, Junio C Hamano gits...@pobox.com wrote: Almost the same comment as 01/19 applies to this comment. I think it makes good sense to have two variants, one that lets the last one win and pass only that last one (i.e. 01/19) and the other that accumulates them into

Re: git lock files (Was: GIT for Microsoft Access projects)

2015-06-10 Thread Fredrik Gustafsson
On Tue, Jun 09, 2015 at 10:19:43AM -0700, Stefan Beller wrote: Just because Git allows distributed workflows, doesn't mean we should only focus on being distributed IMHO. The question for content not being mergable easily pops up all the time. (Game/Graphics designers, documents, all this

Re: [PATCH v2 15/19] pull: teach git pull about --rebase

2015-06-10 Thread Paul Tan
On Wed, Jun 10, 2015 at 9:56 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: +enum rebase_type { + REBASE_INVALID = -1, + REBASE_FALSE = 0, + REBASE_TRUE, + REBASE_PRESERVE +}; + +/** + * Parses the value of --rebase, branch.*.rebase or

[PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-10 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr writes: Actually, once you have this, PATCH 6/7 becomes useless, right? (at least, the test passes if I revert it) It seems to me that doing this space trimming just once, inside or right after split_at_commas would be clearer. You're right, I put

Re: [PATCH 4/4] bisect: add the terms old/new

2015-06-10 Thread Matthieu Moy
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: Hi, thanks for the review, (sorry if you received this twice) Junio C Hamano gits...@pobox.com writes: Just throwing a suggestion. You could perhaps add a new verb to be used before starting to do anything, e.g. $ git

[PATCH 4/4] bisect: add the terms old/new

2015-06-10 Thread Antoine Delaite
Hi, thanks for the review, (sorry if you received this twice) Junio C Hamano gits...@pobox.com writes: Just throwing a suggestion. You could perhaps add a new verb to be used before starting to do anything, e.g. $ git bisect terms new old Yes it would be nice and should not be hard

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-10 Thread Matthieu Moy
Louis-Alexandre Stuber stub...@ensimag.grenoble-inp.fr writes: That is very different from ENOENT, which is an expected error when you are not using a customized terms. But in the current state, we are going to create bisect_terms even if the bisection is in bad/good mode. Which means that

Re: [PATCH v2 02/19] parse-options-cb: implement parse_opt_pass_argv_array()

2015-06-10 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: I don't see how it feels iffy. That is largely a taste thing. And a good taste matters. What is iffy is to use strbuf as an external interface between the implementation of the parse_opt_pass() API function and its users. I would expect that no users of

Re: [PATCH 0/7] changes from last version

2015-06-10 Thread Matthieu Moy
Subject: Re: [PATCH 0/7] changes from last version This is not a good subject. You want the subject to say what the series is about. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

[PATCH v3 6/7] send-email: suppress leading and trailing whitespaces in addresses

2015-06-10 Thread Remi Lespinet
Nothing serious, but you did something weird while sending. This message does not have a References: or an In-reply-to: field, so it breaks threading. See how it's displayed on http://thread.gmane.org/gmane.comp.version-control.git Yes, send-email was aborted after 5/7, I realized and

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-10 Thread Jeff King
On Tue, Jun 09, 2015 at 08:46:24PM -0700, Shawn Pearce wrote: This patch introduces a quick flag to has_sha1_file which callers can use when they would prefer high performance at the cost of false negatives during repacks. There may be other code paths that can use this, but the

Re: [PATCH 2/8] sha1_file: introduce has_object_file helper.

2015-06-10 Thread brian m. carlson
On Wed, Jun 10, 2015 at 04:59:58PM +0700, Duy Nguyen wrote: On Tue, Jun 9, 2015 at 11:28 PM, brian m. carlson sand...@crustytoothpaste.net wrote: diff --git a/sha1_file.c b/sha1_file.c index 7e38148..09f7f03 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -3173,6 +3173,11 @@ int

Re: [PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-10 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Paul Tan pyoka...@gmail.com writes: @@ -422,6 +423,14 @@ int cmd_pull(int argc, const char **argv, const char *prefix) parse_repo_refspecs(argc, argv, repo, refspecs); +git_config(git_default_config, NULL); + +if

Minor issue: bad Spanish translation

2015-06-10 Thread Gabriel
Where it says: Su rama está delante de origin/master para 6 commits. it should say: Su rama está delante de origin/master por 6 commits. Notice para -- por. Cheers, Gabriel -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org

Re: Minor issue: bad Spanish translation

2015-06-10 Thread Johannes Schindelin
Hi Gabriel, On 2015-06-10 16:51, Gabriel wrote: Where it says: Su rama está delante de origin/master para 6 commits. it should say: Su rama está delante de origin/master por 6 commits. Notice para -- por. Good catch. You could earn eternal fame by cloning Git itself (e.g. via `git

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-10 Thread Duy Nguyen
On Wed, Jun 10, 2015 at 9:00 PM, Jeff King p...@peff.net wrote: On Tue, Jun 09, 2015 at 08:46:24PM -0700, Shawn Pearce wrote: This patch introduces a quick flag to has_sha1_file which callers can use when they would prefer high performance at the cost of false negatives during repacks.

Re: [PATCH v2 15/19] pull: teach git pull about --rebase

2015-06-10 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: Hmph, it is somewhat surprising that we do not have such a helper already. Wouldn't we need this logic to implement $branch@{upstream} syntax? Right, the @{upstream} syntax is implemented by branch_get_upstream() in remote.c. It, however, does not check

Re: [PATCH/RFCv5 2/3] git rebase -i: warn about removed commits

2015-06-10 Thread Matthieu Moy
Galan Rémi remi.galan-alfo...@ensimag.grenoble-inp.fr writes: Check if commits were removed (i.e. a line was deleted) and print warnings or stop git rebase depending on the value of the configuration variable rebase.missingCommitsCheck. This patch gives the user the possibility to avoid

Re: [PATCH] git-checkout.txt: Document git checkout pathspec better

2015-06-10 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: git checkout pathspec can be used to revert changes in the working tree. I somehow thought that concensus in the recent thread was that restore, not revert, is the more appropriate wording? And I think that is indeed sensible because revert (or reset)

Re: [RFC/PATCH 3/9] for-each-ref: add '--points-at' option

2015-06-10 Thread Karthik Nayak
On 06/10/2015 12:37 AM, Junio C Hamano wrote: Karthik Nayak karthik@gmail.com writes: @@ -54,7 +59,6 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix) /* for warn_ambiguous_refs */ git_config(git_default_config, NULL); -memset(ref_cbdata, 0,

[PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-10 Thread Antoine Delaite
Hi, Thanks for the review ! (sorry if you received this twice) Christian Couder christian.cou...@gmail.com wrote : + name_bad = bad; + name_good = good; + } else { + strbuf_getline(str, fp, '\n'); + name_bad = strbuf_detach(str, NULL); + strbuf_getline(str, fp, '\n'); +

[PATCH 2/4] bisect: replace hardcoded bad|good by variables

2015-06-10 Thread Antoine Delaite
Hi, Thanks for the review, (sorry if you received this twice) Matthieu Moy matthieu@grenoble-inp.fr wrote: +static const char *name_bad; +static const char *name_good; Same remark as PATCH 2. After the discussion you had with Christian I think we will keep name_bad/good for now.

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-10 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: Louis-Alexandre Stuber stub...@ensimag.grenoble-inp.fr writes: That is very different from ENOENT, which is an expected error when you are not using a customized terms. But in the current state, we

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-10 Thread Matthieu Moy
Louis-Alexandre Stuber stub...@ensimag.grenoble-inp.fr writes: But ENOENT is not a normal case at all. Should we not treat it the same way as other fopen() errors ? (either going on with default case or returning an error) Would : if (!fp) { die(could not read

Re: [PATCH 4/4] bisect: add the terms old/new

2015-06-10 Thread Christian Couder
On Wed, Jun 10, 2015 at 5:24 PM, Junio C Hamano gits...@pobox.com wrote: Matthieu Moy matthieu@grenoble-inp.fr writes: Somebody else did it like that is not a good justification. Especially when the previous code was not merged: the code wasn't finished. But I actually disagree with the

Re: [PATCH v2 15/19] pull: teach git pull about --rebase

2015-06-10 Thread Paul Tan
On Wed, Jun 10, 2015 at 10:44 PM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: Hmph, it is somewhat surprising that we do not have such a helper already. Wouldn't we need this logic to implement $branch@{upstream} syntax? Right, the @{upstream} syntax is

[PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-10 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com writes: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes: I agree, I'd like to put it right after split_at_commas in a separate function trim_list. Is it a good idea even if the function is one

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-10 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com writes: But I do not think it is a good idea to penalize the normal case by writing the terms file and reading them back from it when the user is bisecting with good/bad in the first place, so No strong

Re: [PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-10 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com writes: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes: I agree, I'd like to put it right after split_at_commas in a separate function trim_list. Is it a good idea even if the function is one

Re: [PATCH v2 15/19] pull: teach git pull about --rebase

2015-06-10 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: so it's more or less a direct translation of the shell script, and we can be sure it will have the same behavior. I'm definitely in favor of switching this to use remote_find_tracking(), the question is whether we want to do it in this patch or in a future

Re: [PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-10 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes: I agree, I'd like to put it right after split_at_commas in a separate function trim_list. Is it a good idea even if the function is one line long ? Hmph, if I have A, B, C and call a

Re: [PATCH/RFCv5 2/3] git rebase -i: warn about removed commits

2015-06-10 Thread Remi Galan Alfonso
Matthieu Moy matthieu@grenoble-inp.fr writes: Remi Galan Alfonso remi.galan-alfo...@ensimag.grenoble-inp.fr writes: Matthieu Moy matthieu@grenoble-inp.fr writes: +warn_file $todo.miss I would find it more elegant with less intermediate files, like

[PATCH v2 3/7] bisect: simplify the addition of new bisect terms

2015-06-10 Thread Antoine Delaite
We create a file BISECT_TERMS in the repository .git to be read during a bisection. The fonctions to be changed if we add new terms are quite few. In git-bisect.sh : check_and_set_terms bisect_voc In bisect.c : handle_bad_merge_base Signed-off-by: Antoine Delaite

[PATCH v2 2/7] bisect: replace hardcoded bad|good by variables

2015-06-10 Thread Antoine Delaite
To add new tags like old/new and have keywords less confusing, the first step is to avoid hardcoding the keywords. The default mode is still bad/good. Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr Signed-off-by:

[PATCH v2 4/7] bisect: add the terms old/new

2015-06-10 Thread Antoine Delaite
When not looking for a regression during a bisect but for a fix or a change in another given property, it can be confusing to use 'good' and 'bad'. This patch introduce `git bisect new` and `git bisect old` as an alternative to 'bad' and good': the commits which have a certain property must be

Re: [PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

2015-06-10 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com writes: Hmph, if I have A, B, C and call a function that gives an array of addresses, treating the input as comma-separated addresses, I would expect (A, B, C) to be

Re: [PATCH] git-checkout.txt: Document git checkout pathspec better

2015-06-10 Thread Junio C Hamano
Ed Avis e...@waniasset.com writes: 'restore' may be more consistent with git's internal terminology. But from an outsider's perspective, 'revert' rather than 'restore' is in my view much clearer and more consistent with other version control systems: for example 'svn revert' is what you use

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-10 Thread Matthieu Moy
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: +get_terms () { +if test -s $GIT_DIR/BISECT_TERMS +then +NAME_BAD=$(sed -n 1p $GIT_DIR/BISECT_TERMS) +NAME_GOOD=$(sed -n 2p $GIT_DIR/BISECT_TERMS) It is sad that we need to open

Re: [PATCH/RFCv5 3/3] git rebase -i: add static check for commands and SHA-1

2015-06-10 Thread Matthieu Moy
Remi Galan Alfonso remi.galan-alfo...@ensimag.grenoble-inp.fr writes: It is mainly because here the SHA-1 is a long one (40 chars) OK, but then the minimum would be to add a comment saying that. Now, this makes me wonder why you are doing the check after the sha1 expansion and not before.

Re: [PATCH 4/4] bisect: add the terms old/new

2015-06-10 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com writes: On Wed, Jun 10, 2015 at 5:24 PM, Junio C Hamano gits...@pobox.com wrote: Matthieu Moy matthieu@grenoble-inp.fr writes: Moving from one hardcoded pair of terms to two hardcoded pairs of terms is a nice feature, but hardly a step in the

Re: [PATCH/RFCv5 3/3] git rebase -i: add static check for commands and SHA-1

2015-06-10 Thread Remi Galan Alfonso
+git stripspace --strip-comments | +while read -r command sha1 rest +do +case $command in +''|noop|x|exec) +;; +pick|p|drop|d|reword|r|edit|e|squash|s|fixup|f) +

Re: [PATCH/RFCv5 2/3] git rebase -i: warn about removed commits

2015-06-10 Thread Remi Galan Alfonso
Matthieu Moy matthieu@grenoble-inp.fr writes: +warn_file $todo.miss I would find it more elegant with less intermediate files, like git rev-list $opt $todo.miss | while read -r line do warn - $line done I am not really sure since I also use

Re: [PATCH/RFCv5 2/3] git rebase -i: warn about removed commits

2015-06-10 Thread Matthieu Moy
Remi Galan Alfonso remi.galan-alfo...@ensimag.grenoble-inp.fr writes: Matthieu Moy matthieu@grenoble-inp.fr writes: +warn_file $todo.miss I would find it more elegant with less intermediate files, like git rev-list $opt $todo.miss | while read -r line do

Re: git lock files

2015-06-10 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: I could imagine a git lock command which looks like this: git config lock.centralServer origin git config lock.defaultBranch master git lock add [branch] [--] path/to/file git lock remove [branch] [--] path/to/file git lock ls

Re: [PATCH] checkout: don't check worktrees when not necessary

2015-06-10 Thread Spencer Baugh
Duy Nguyen pclo...@gmail.com writes: On Sun, May 31, 2015 at 07:16:29PM -0400, Spencer Baugh wrote: --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1237,6 +1237,7 @@ static int parse_branchname_arg(int argc, const char **argv, char *head_ref = resolve_refdup(HEAD, 0,

Re: [PATCH] clone: check if server supports shallow clones

2015-06-10 Thread Michael Edgar
On Wed, Jun 10, 2015 at 3:05 PM, Jeff King p...@peff.net wrote: I see that do_fetch_pack checks server_supports(shallow). Is that enough to cover all fetch cases? And if it is, why does it not cover the matching clone cases? -Peff Great question. I determined that the do_fetch_pack logic

Re: [PATCH 3/3] stash: require a clean index to apply

2015-06-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: So I am trying to figure out what the use case here is. Clearly the above is a toy case, but why is stash -k followed by a quick pop useful in general? Certainly I use stash (without -k) and a quick pop all the time, and I think that is what stash was designed

Re: [PATCH 3/3] stash: require a clean index to apply

2015-06-10 Thread Jeff King
On Wed, Jun 10, 2015 at 12:16:25PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: So I am trying to figure out what the use case here is. Clearly the above is a toy case, but why is stash -k followed by a quick pop useful in general? Certainly I use stash (without -k) and a

Re: [PATCH 03/14] lockfile: remove some redundant functions

2015-06-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Remove the following functions and rewrite their callers to use the equivalent tempfile functions directly: * fdopen_lock_file() - fdopen_tempfile() * reopen_lock_file() - reopen_tempfile() * close_lock_file() - close_tempfile() Hmph, My

Re: [PATCH 07/14] register_tempfile(): new function to handle an existing temporary file

2015-06-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Allow an existing file to be registered with the tempfile-handling infrastructure; in particular, arrange for it to be deleted on program exit. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Hmph. Where does such a tempfile that is

Re: [PATCH 02/14] tempfile: a new module for handling temporary files

2015-06-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: diff --git a/builtin/add.c b/builtin/add.c index df5135b..aaa9ce4 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -5,6 +5,7 @@ */ #include cache.h #include builtin.h +#include tempfile.h #include lockfile.h #include dir.h #include

Re: [PATCH 06/14] tempfile: add several functions for creating temporary files

2015-06-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Add several functions for creating temporary files with automatically-generated names, analogous to mkstemps(), but also arranging for the files to be deleted on program exit. The functions are named according to a pattern depending how they

[PATCH] git-prompt.sh: Document GIT_PS1_STATESEPARATOR

2015-06-10 Thread Joe Cridge
The environment variable GIT_PS1_STATESEPARATOR can be used to set the separator between the branch name and the state symbols in the prompt. At present the variable is not mentioned in the inline documentation which makes it difficult for the casual user to identify. Signed-off-by: Joe Cridge

Re: [PATCH 3/3] stash: require a clean index to apply

2015-06-10 Thread Jeff King
On Wed, Jun 10, 2015 at 03:19:41PM -0300, bär wrote: On Sun, Jun 7, 2015 at 9:40 AM, Jeff King p...@peff.net wrote: Hrm. The new protection in v2.4.2 is meant to prevent you from losing your index state during step 4 when we run into a conflict. But here you know something that git

Re: format-patch and submodules

2015-06-10 Thread Christopher Dunn
Sorry. I thought empty patches were made to work in other cases. 'git-p4' needs to skip these. Wrong mailing list then. On Tue, Jun 9, 2015 at 1:52 PM, Jens Lehmann jens.lehm...@web.de wrote: Am 05.06.2015 um 01:20 schrieb Christopher Dunn: (Seen in git versions: 2.1.0 and 1.9.3 et al.) $

RFC: 'git-sym' for large files

2015-06-10 Thread Christopher Dunn
https://github.com/cdunn2001/git-sym https://github.com/cdunn2001/git-sym-test/wiki/Examples -- 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

Re: [PATCH] git-checkout.txt: Document git checkout pathspec better

2015-06-10 Thread Torsten Bögershausen
On 2015-06-10 17.05, Junio C Hamano wrote: Torsten Bögershausen tbo...@web.de writes: (Need to drop Eric from CC-list( git checkout pathspec can be used to revert changes in the working tree. I somehow thought that concensus in the recent thread was that restore, not revert, is the more

Re: [PATCH 08/14] write_shared_index(): use tempfile module

2015-06-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- read-cache.c | 37 + 1 file changed, 5 insertions(+), 32 deletions(-) Nicely done. diff --git a/read-cache.c b/read-cache.c index 3e49c49..4f7b70f

Re: [PATCH 00/14] Introduce a tempfile module

2015-06-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: These patches are also available from my GitHub repo [2], branch tempfile. Overall the series made a lot of sense. On a few points I raised: - I still think that exposing the implementation detail of the lockfile API that it builds on

[PATCH] clone: check if server supports shallow clones

2015-06-10 Thread Mike Edgar
When the user passes --depth to git-clone the server's capabilities are not currently consulted. The client will send shallow requests even if the server does not understand them, and the resulting error may be unhelpful to the user. This change pre-emptively checks so git-clone can exit with a

Re: [PATCH] clone: check if server supports shallow clones

2015-06-10 Thread Jeff King
On Wed, Jun 10, 2015 at 02:35:20PM -0400, Mike Edgar wrote: When the user passes --depth to git-clone the server's capabilities are not currently consulted. The client will send shallow requests even if the server does not understand them, and the resulting error may be unhelpful to the user.

Re: [PATCH 3/3] stash: require a clean index to apply

2015-06-10 Thread bär
On Sun, Jun 7, 2015 at 9:40 AM, Jeff King p...@peff.net wrote: Hrm. The new protection in v2.4.2 is meant to prevent you from losing your index state during step 4 when we run into a conflict. But here you know something that git doesn't: that we just created the stash based on this same

[PATCH v2 5/7] bisect: change read_bisect_terms parameters

2015-06-10 Thread Antoine Delaite
From: Louis Stuber stub...@ensimag.grenoble-inp.fr The function reads BISECT_TERMS and stores it at the adress given in parameters (instead of global variables name_bad and name_good). This allows to use the function outside bisect.c. Signed-off-by: Antoine Delaite

[PATCH v2 7/7] bisect: allows any terms set by user

2015-06-10 Thread Antoine Delaite
Introduction of the git bisect terms function. The user can set its own terms. List of known commands not available : `git bisect replay` `git bisect terms term1 term2 then git bisect start bad_rev good_rev` Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by:

[PATCH v2 6/7] revision: fix rev-list --bisect in old/new mode

2015-06-10 Thread Antoine Delaite
From: Louis Stuber stub...@ensimag.grenoble-inp.fr Calling git rev-list --bisect when an old/new mode bisection was started shows the help notice. This has been fixed by reading BISECT_TERMS in revision.c to find the correct bisect refs path (which was always refs/bisect/bad (or good) before and

Re: [PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-10 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: On Wed, Jun 10, 2015 at 10:38 PM, Junio C Hamano gits...@pobox.com wrote: If you are going to do the git_config() call yourself, it might make more sense to define git_pull_config() callback and parse the pull.ff yourself, updating the use of the lazy

Re: [PATCH 03/14] lockfile: remove some redundant functions

2015-06-10 Thread Johannes Sixt
Am 10.06.2015 um 19:40 schrieb Junio C Hamano: Michael Haggerty mhag...@alum.mit.edu writes: Remove the following functions and rewrite their callers to use the equivalent tempfile functions directly: * fdopen_lock_file() - fdopen_tempfile() * reopen_lock_file() - reopen_tempfile() *

Re: format-patch and submodules

2015-06-10 Thread Luke Diamand
On 10/06/15 18:04, Christopher Dunn wrote: Sorry. I thought empty patches were made to work in other cases. 'git-p4' needs to skip these. Wrong mailing list then. Possibly the right mailing list - can you explain what you mean here w.r.t git-p4 please? Thanks! Luke On Tue, Jun 9,

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-10 Thread Junio C Hamano
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: -USAGE='[help|start|bad|good|new|old|skip|next|reset|visualize|replay|log|run]' +USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]' I think this patch makes the whole series go in the right

Re: [PATCH] doc: format-patch: fix typo

2015-06-10 Thread Junio C Hamano
Frans Klaver franskla...@gmail.com writes: reroll count documentation states that vn will be pretended to the filename. Judging by the examples that should have been 'prepended'. Signed-off-by: Frans Klaver franskla...@gmail.com --- Good eyes; thanks. Documentation/git-format-patch.txt |

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-10 Thread Shawn Pearce
On Wed, Jun 10, 2015 at 7:00 AM, Jeff King p...@peff.net wrote: On Tue, Jun 09, 2015 at 08:46:24PM -0700, Shawn Pearce wrote: This patch introduces a quick flag to has_sha1_file which callers can use when they would prefer high performance at the cost of false negatives during repacks.

Re: [PATCH 02/14] tempfile: a new module for handling temporary files

2015-06-10 Thread Michael Haggerty
On 06/10/2015 07:36 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: diff --git a/builtin/add.c b/builtin/add.c index df5135b..aaa9ce4 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -5,6 +5,7 @@ */ #include cache.h #include builtin.h +#include tempfile.h

Re: [PATCH] clone: check if server supports shallow clones

2015-06-10 Thread Jeff King
On Wed, Jun 10, 2015 at 04:25:45PM -0400, Michael Edgar wrote: On Wed, Jun 10, 2015 at 3:05 PM, Jeff King p...@peff.net wrote: I see that do_fetch_pack checks server_supports(shallow). Is that enough to cover all fetch cases? And if it is, why does it not cover the matching clone cases?

Re: [PATCH 3/3] stash: require a clean index to apply

2015-06-10 Thread bär
On Wed, Jun 10, 2015 at 4:27 PM, Jeff King p...@peff.net wrote: I dunno. With respect to the original patch, I am OK if we just want to revert it. This area of stash seems a bit under-designed IMHO, but if people were happy enough with it before, I do not think the safety benefit from ed178ef

Re: [PATCH v2 7/7] bisect: allows any terms set by user

2015-06-10 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: I like this change very much; it removes the mysteriously misnamed start-bad-good variable (because you do not really _care_ that 'start' was what implicitly decided that good/bad pair is the term we use in this session; what you care is that the terms

Re: format-patch and submodules

2015-06-10 Thread Christopher Dunn
Well, now it gets more complicated. I want git-p4 to ignore submodules completely. But it fails only *only* the submodules changed. (At least, my version fails. I'll try to diff against latest.) But to debug this, I had to add a dry-run mode to git-p4. And I am using a version of git-p4 which

Re: [PATCH 0/8] object_id part 2

2015-06-10 Thread Junio C Hamano
brian m. carlson sand...@crustytoothpaste.net writes: The final piece in this series is the conversion of struct object to use struct object_id. This is a necessarily large patch because of the large number of places this code is used. brian m. carlson (8): refs: convert some internal

Re: [PATCH v2 4/7] bisect: add the terms old/new

2015-06-10 Thread Junio C Hamano
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: Related discussions: - http://thread.gmane.org/gmane.comp.version-control.git/86063 introduced bisect fix unfixed to find fix. - http://thread.gmane.org/gmane.comp.version-control.git/182398

[PATCH] doc: format-patch: fix typo

2015-06-10 Thread Frans Klaver
reroll count documentation states that vn will be pretended to the filename. Judging by the examples that should have been 'prepended'. Signed-off-by: Frans Klaver franskla...@gmail.com --- Documentation/git-format-patch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: Using clean/smudge scripts from repository

2015-06-10 Thread Bob Bell
On Wed, Jun 10, 2015 at 08:22:18AM -0700, Junio C Hamano wrote: Bob Bell b_...@thebellsplace.com writes: Is this a proper solution, or did I just luck out? Am I perhaps doing something foolish? Yes, we happen to run checkout in the index order, but that is not something we guarantee, so

Re: [PATCH 02/14] tempfile: a new module for handling temporary files

2015-06-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 06/10/2015 07:36 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: diff --git a/builtin/add.c b/builtin/add.c index df5135b..aaa9ce4 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -5,6 +5,7 @@ */ #include

Re: [PATCH v2 15/19] pull: teach git pull about --rebase

2015-06-10 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: +/** + * Returns remote's upstream branch for the current branch. If remote is NULL, + * the current branch's configured default remote is used. Returns NULL if + * `remote` does not name a valid remote, HEAD does not point to a branch, + * remote is not

  1   2   >