Re: [PATCH 2/5] am: teach StGit patch parser how to read from stdin

2015-06-09 Thread Paul Tan
On Tue, Jun 9, 2015 at 3:57 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: git-mailsplit, which splits mbox patches, will read the patch from stdin when the filename is - or there are no files listed on the command-line. To be consistent with this behavior,

Re: [PATCH 03/13] delete_ref(): handle special case more explicitly

2015-06-09 Thread Michael Haggerty
On 06/08/2015 06:48 PM, Stefan Beller wrote: On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty mhag...@alum.mit.edu wrote: delete_ref() uses a different convention for its old_sha1 parameter than, say, ref_transaction_delete(): NULL_SHA1 means not to check the old value. Make this fact a little

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Johannes Schindelin
Hi, On 2015-06-08 23:00, Michael Rappazzo wrote: diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index dc3133f..b92375e 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -977,7 +977,9 @@ else revisions=$onto...$orig_head

Re: [PATCH 01/13] delete_ref(): move declaration to refs.h

2015-06-09 Thread Michael Haggerty
On 06/08/2015 06:43 PM, Stefan Beller wrote: On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty mhag...@alum.mit.edu wrote: [...] +/* + * Delete the specified reference. If old_sha1 is non-NULL and not + * NULL_SHA1, then verify that the current value of the reference is + * old_sha1 before

Re: [PATCH 06/13] delete_refs(): convert error message to lower case

2015-06-09 Thread Michael Haggerty
On 06/08/2015 06:51 PM, Stefan Beller wrote: On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty mhag...@alum.mit.edu wrote: This string is going to have to be re-internationalized anyway because of the previous commit. So while we're at it, we might as well convert it to lower case as per our

Re: [PATCH 5/6] am --abort: support aborting to unborn branch

2015-06-09 Thread Paul Tan
On Tue, Jun 9, 2015 at 4:10 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: When git-am is first run on an unborn branch, no ORIG_HEAD is created. As such, any applied commits will remain even after a git am --abort. I think this answered my question on 4/6;

Re: [PATCH 1/1]: git-completion.tcsh fails w/ noclobber

2015-06-09 Thread Christian Couder
The subject is better but still not quite there. I suggest: [PATCH] git-completion.tcsh: fix redirect with noclobber On Tue, Jun 9, 2015 at 1:01 AM, Ariel Faigon github.2...@yendor.com wrote: tcsh users who happen to have 'set noclobber' elsewhere in their ~/.tcshrc or ~/.cshrc startup files

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Mike Rappazzo
I see your point, and I'll explore that avenue. Personally, I like the idea that one could also use the short hash if the custom instruction started with %h , but I see the value in leaving the variable blank. After running the tests with a custom format enabled, I did find that autosquash

Re: [PATCH 3/4] status: give more information during rebase -i

2015-06-09 Thread Guillaume Pages
Junio C Hamano gits...@pobox.com writes: Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr writes: git status gives more information during rebase -i, about the list of command that are done during the rebase. It displays the two last commands executed and the two next lines to be

Re: GNU diff and git diff - difference on myers algorithm?

2015-06-09 Thread Johannes Schindelin
Hi Luis, On 2015-06-08 20:34, Luis R. Rodriguez wrote: Based on a cursory review of the git code I get the impression that GNU diff and git 'diff' do not share any code for the possible diff algorithms. Indeed, Git's diff machinery is based[*1*] ofn libxdiff[*2*], not on GNU diff. I'm in

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

2015-06-09 Thread Christian Couder
On Tue, Jun 9, 2015 at 9:01 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Subject: Re: [PATCH 3/4] bisect: simplify the add of new bisect terms s/add/addition/ Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: +static const char *name_bad; +static const char

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

2015-06-09 Thread Christian Couder
On Tue, Jun 9, 2015 at 8:45 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: --- a/git-bisect.sh +++ b/git-bisect.sh @@ -32,6 +32,8 @@ OPTIONS_SPEC= _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'

Re: [PATCH 6/6] am --abort: keep unrelated commits on unborn branch

2015-06-09 Thread Paul Tan
On Tue, Jun 9, 2015 at 4:13 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure and warn, 2010-12-21), git-am would refuse to rewind HEAD if commits were made since the last git-am failure.

Re: [PATCH 07/13] prune_remote(): use delete_refs()

2015-06-09 Thread Michael Haggerty
On 06/08/2015 07:12 PM, Jeff King wrote: On Mon, Jun 08, 2015 at 09:57:04AM -0700, Stefan Beller wrote: On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty mhag...@alum.mit.edu wrote: This will result in errors being emitted for references that can't be deleted, but that is a good thing.

Re: [RFC/PATCH 1/9] tag: libify parse_opt_points_at()

2015-06-09 Thread Karthik Nayak
On 06/09/2015 12:30 AM, Junio C Hamano wrote: This feels way too specialized to live as part of parse_options infrastructure. The existing caller(s) may want to use this callback for parsing points-at option they have, but is that the only plausible use of this callback? It looks to be usable

Re: [PATCH 07/13] prune_remote(): use delete_refs()

2015-06-09 Thread Jeff King
On Tue, Jun 09, 2015 at 12:50:13PM +0200, Michael Haggerty wrote: The new code (in delete_refs()) allows delete_ref() to emit its error, but then follows it up with error(_(could not remove reference %s), refname) The could not remove reference error originally came from a similar

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

2015-06-09 Thread Karthik Nayak
On 06/09/2015 12:42 AM, Junio C Hamano wrote: Is this intended? I would have expected if I did git for-each-ref --points-at master I would get refs/heads/master and any other refs that exactly points at that commit. Thats to be changed, thanks! FIELD NAMES --- diff

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On 06/08/2015 10:51 PM, Matthieu Moy wrote: We could introduce ref-filter.h earlier, indeed. To me, the current solution is good enough, but introducing ref-filter.h early and adding function definition there in the same commit as you drop the

Re: [PATCH 1/4] status: factor two rebase-related messages together

2015-06-09 Thread Guillaume Pages
Junio C Hamano gits...@pobox.com writes: Hmmm, it obviously does not break anything but it is not obvious why this is a good change. Is it that you wanted to have a single instance of if on a branch, we say 'you are rebasing that branch', otherwise we say 'you are rebasing'? Even then, I am

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

2015-06-09 Thread Matthieu Moy
Subject: Re: [PATCH 3/4] bisect: simplify the add of new bisect terms s/add/addition/ Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: +static const char *name_bad; +static const char *name_good; Same remark as PATCH 2. } else if (starts_with(refname, good-)) { Did

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

2015-06-09 Thread Matthieu Moy
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: --- a/git-bisect.sh +++ b/git-bisect.sh @@ -32,6 +32,8 @@ OPTIONS_SPEC= _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' _x40=$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40 +NAME_BAD=bad +NAME_GOOD=good I would have written

Re: On undoing a forced push

2015-06-09 Thread Sitaram Chamarty
On 06/09/2015 05:42 PM, Duy Nguyen wrote: From a thread on Hacker News. It seems that if a user does not have access to the remote's reflog and accidentally forces a push to a ref, how does he recover it? In order to force push again to revert it back, he would need to know the remote's old

Re: [PATCH 2/4] status: differentiate interactive from non-interactive rebases

2015-06-09 Thread Matthieu Moy
Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr writes: Signed-off-by: Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr --- t/t7512-status-help.sh | 28 ++-- wt-status.c| 5 - Are there any change since the last version? Please, help

Re: On undoing a forced push

2015-06-09 Thread Sitaram Chamarty
On 06/09/2015 07:55 PM, Jeff King wrote: On Tue, Jun 09, 2015 at 07:36:20PM +0530, Sitaram Chamarty wrote: This patch prints the latest SHA-1 before the forced push in full. He then can do git push remote +old-sha1:ref He does not even need to have the objects that old-sha1 refers

How to compile without iconv?

2015-06-09 Thread Sascha Ziemann
I tried to compile git 2.4.3 on Solaris 10. I used the following configuration: $ ./configure --without-iconv $ grep -i iconv config.status ac_cs_config='--without-iconv' set X /bin/bash './configure' '--without-iconv' $ac_configure_extra_args --no-create --no-recursion

Re: [PATCH 1/4] status: factor two rebase-related messages together

2015-06-09 Thread Matthieu Moy
Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr writes: Signed-off-by: Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr --- wt-status.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/wt-status.c b/wt-status.c index

Re: On undoing a forced push

2015-06-09 Thread brian m. carlson
On Tue, Jun 09, 2015 at 07:12:21PM +0700, Duy Nguyen wrote: diff --git a/transport.c b/transport.c index f080e93..6bd6a64 100644 --- a/transport.c +++ b/transport.c @@ -657,16 +657,17 @@ static void print_ok_ref_status(struct ref *ref, int porcelain) [new branch]),

[PATCH 3/4] status: give more information during rebase -i

2015-06-09 Thread Guillaume Pagès
git status gives more information during rebase -i, about the list of command that are done during the rebase. It displays the two last commands executed and the two next lines to be executed. It also gives hints to find the whole files in .git directory. Signed-off-by: Guillaume Pagès

[PATCH 1/4] status: factor two rebase-related messages together

2015-06-09 Thread Guillaume Pagès
Signed-off-by: Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr --- wt-status.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/wt-status.c b/wt-status.c index 33452f1..c239132 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1025,6

[PATCH 2/4] status: differentiate interactive from non-interactive rebases

2015-06-09 Thread Guillaume Pagès
Signed-off-by: Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr --- t/t7512-status-help.sh | 28 ++-- wt-status.c| 5 - 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index

[PATCH 4/4] status: add new tests for status during rebase -i

2015-06-09 Thread Guillaume Pagès
Expand test coverage with one or more than two commands done and with zero, one or more than two commands remaining. Signed-off-by: Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr --- t/t7512-status-help.sh | 87 ++ 1 file changed, 87

Re: On undoing a forced push

2015-06-09 Thread Jeff King
On Tue, Jun 09, 2015 at 07:36:20PM +0530, Sitaram Chamarty wrote: This patch prints the latest SHA-1 before the forced push in full. He then can do git push remote +old-sha1:ref He does not even need to have the objects that old-sha1 refers to. We could simply push an empty

Re: gitscm vs. git-scm

2015-06-09 Thread Jeff King
On Tue, Jun 09, 2015 at 03:08:46PM +0200, Matthieu Moy wrote: I guess gitscm.com should just redirect to git-scm.com (sending the Location: field, and/or with stg like meta http-equiv=Refresh content=0; URL=http://git-scm.com; / We (the git project) don't own gitscm.com. I don't recognize the

Re: On undoing a forced push

2015-06-09 Thread Johannes Schindelin
Hi, On 2015-06-09 16:06, Sitaram Chamarty wrote: On 06/09/2015 05:42 PM, Duy Nguyen wrote: From a thread on Hacker News. It seems that if a user does not have access to the remote's reflog and accidentally forces a push to a ref, how does he recover it? In order to force push again to revert

[PATCH 3/8] Convert struct ref to use object_id.

2015-06-09 Thread brian m. carlson
Use struct object_id in three fields in struct ref and convert all the necessary places that use it. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- builtin/clone.c| 16 +++--- builtin/fetch-pack.c | 4 ++-- builtin/fetch.c| 50

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

2015-06-09 Thread brian m. carlson
Add has_object_file, which is a wrapper around has_sha1_file, but for struct object_id. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- cache.h | 3 +++ sha1_file.c | 5 + 2 files changed, 8 insertions(+) diff --git a/cache.h b/cache.h index 571c98f..fa1f067 100644 ---

[PATCH 7/8] ref_newer: convert to use struct object_id

2015-06-09 Thread brian m. carlson
Convert ref_newer and its caller to use struct object_id instead of unsigned char *. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- builtin/remote.c | 2 +- http-push.c | 4 ++-- remote.c | 8 remote.h | 2 +- 4 files changed, 8 insertions(+), 8

[PATCH 0/8] object_id part 2

2015-06-09 Thread brian m. carlson
This is another series of conversions to struct object_id. This series converts more of the refs code and struct object to use struct object_id. It introduces two additional helper functions. One is has_object_file, which is the equivalent of has_sha1_file. The name was chosen to be slightly

[PATCH 1/8] refs: convert some internal functions to use object_id

2015-06-09 Thread brian m. carlson
Convert several internal functions in refs.c to use struct object_id, and use the GIT_SHA1_HEXSZ constants in parse_ref_line. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- refs.c | 104 - 1 file changed, 52

[PATCH 6/8] parse_fetch: convert to use struct object_id

2015-06-09 Thread brian m. carlson
Convert the parse_fetch function to use struct object_id. Switch from get_sha1_hex to parse_oid_hex to avoid hard-coding constants. Remove the strlen check as parse_oid_hex will fail safely on receiving a too-short NUL-terminated string. Signed-off-by: brian m. carlson

[PATCH 4/8] Add a utility function to make parsing hex values easier.

2015-06-09 Thread brian m. carlson
get_oid_hex is already available for parsing hex object IDs into struct object_id, but parsing code still must hard-code the number of bytes read. Introduce parse_oid_hex, which accepts an optional length, and also returns the number of bytes parsed on success, or 0 on failure. This makes it

[PATCH 5/8] add_sought_entry_mem: convert to struct object_id

2015-06-09 Thread brian m. carlson
Convert this function to use struct object_id. Use parse_oid_hex to avoid having to hard-code the number of bytes to be parsed. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- builtin/fetch-pack.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 01/13] delete_ref(): move declaration to refs.h

2015-06-09 Thread Stefan Beller
On Tue, Jun 9, 2015 at 3:10 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 06/08/2015 06:43 PM, Stefan Beller wrote: On Mon, Jun 8, 2015 at 4:45 AM, Michael Haggerty mhag...@alum.mit.edu wrote: [...] +/* + * Delete the specified reference. If old_sha1 is non-NULL and not + *

Re: On undoing a forced push

2015-06-09 Thread Stefan Beller
On Tue, Jun 9, 2015 at 9:29 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi, On 2015-06-09 16:06, Sitaram Chamarty wrote: On 06/09/2015 05:42 PM, Duy Nguyen wrote: From a thread on Hacker News. It seems that if a user does not have access to the remote's reflog and accidentally

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

2015-06-09 Thread Stefan Beller
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 binary stuff, where there is no good merge driver). I could imagine a

[PATCH v3 1/7] t9001-send-email: move script creation in a setup test

2015-06-09 Thread Remi Lespinet
Move the creation of the scripts used in to-cmd and cc-cmd tests in a setup test to make them available for later tests. This will be used in the next commit. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- t/t9001-send-email.sh | 15 +-- 1 file changed, 9

[PATCH 0/7] changes from last version

2015-06-09 Thread Remi Lespinet
CHANGES (since last submitted version) 1/7 : identical to previous 1/5 2/7 : identical to previous 2/5 3/7 : identical to previous 3/5 4/7 : Modification previously done by 5/5 (refactoring address process) 5/7 : identical modulo a minor change at hunk @@ -1023,8 +1009,13 @@ in the

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

2015-06-09 Thread Jeff King
On Tue, Jun 09, 2015 at 01:24:36PM -0400, Jeff King wrote: I tested this on my system, and confirmed that for a git clone --no-local --bare git.git: 1. It cuts the number of openat/getdents/close syscalls by several orders of magnitude. 2. The overall time drops from ~11.4s to

Re: [PATCH v2 2/2] object name: introduce '^{/!-negative pattern}' notation

2015-06-09 Thread Will Palmer
On Mon, Jun 8, 2015 at 5:39 PM, Junio C Hamano gits...@pobox.com wrote: Will Palmer wmpal...@gmail.com writes: diff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh index e0fe102..8a5983f 100755 --- a/t/t1511-rev-parse-caret.sh +++ b/t/t1511-rev-parse-caret.sh @@ -19,13 +19,17

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

2015-06-09 Thread Junio C Hamano
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, sizeof(ref_cbdata)); I cannot quite see how this

[PATCH v7 1/5] setup: add gentle version of read_gitfile

2015-06-09 Thread Erik Elfström
read_gitfile will die on most error cases. This makes it unsuitable for speculative calls. Extract the core logic and provide a gentle version that returns NULL on failure. The first usecase of the new gentle version will be to probe for submodules during git clean. Helped-by: Junio C Hamano

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

2015-06-09 Thread Remi Lespinet
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 allow to recognize strings like alias or alias\t passed by --to, --cc, --bcc options or by the git

Re: [PATCH 00/13] Improve refs module encapsulation

2015-06-09 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Add functions to the reference API to * Delete a bunch of references at once, but *without* failing the whole transaction if one of the deletions fails. This functionality is used by `git remote remove` and `git remote prune`. * Create

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

2015-06-09 Thread Antoine Delaite
Hi, Thanks for the review, Junio C Hamano gits...@pobox.com writes: /* + * The terms used for this bisect session are stocked in + * BISECT_TERMS: it can be bad/good or new/old. + * We read them and stock them to adapt the messages + * accordingly. Default is bad/good. + */

[PATCH v7 3/5] t7300: add tests to document behavior of clean and nested git

2015-06-09 Thread Erik Elfström
Signed-off-by: Erik Elfström erik.elfst...@gmail.com --- t/t7300-clean.sh | 142 +++ 1 file changed, 142 insertions(+) diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index 99be5d9..fbfdf2d 100755 --- a/t/t7300-clean.sh +++ b/t/t7300-clean.sh

[PATCH v7 2/5] setup: sanity check file size in read_gitfile_gently

2015-06-09 Thread Erik Elfström
read_gitfile_gently will allocate a buffer to fit the entire file that should be read. Add a sanity check of the file size before opening to avoid allocating a potentially huge amount of memory if we come across a large file that someone happened to name .git. The limit is set to a sufficiently

[PATCH v7 4/5] p7300: add performance tests for clean

2015-06-09 Thread Erik Elfström
The tests are run in dry-run mode to avoid having to restore the test directories for each timed iteration. Using dry-run is an acceptable compromise since we are mostly interested in the initial computation of what to clean and not so much in the cleaning it self. Signed-off-by: Erik Elfström

Re: [PATCH 2/4] status: differentiate interactive from non-interactive rebases

2015-06-09 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr writes: Signed-off-by: Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr --- t/t7512-status-help.sh | 28 ++-- wt-status.c| 5 - Are

Re: [PATCH 05/13] delete_refs(): improve error message

2015-06-09 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Change the error message from Could not remove branch %s to Could not remove reference %s This change makes sense even for the existing caller, which uses the function to delete remote-tracking branches. I am 80% convinced ;-) The

Re: [PATCH] git-completion.tcsh: fix redirect with noclobber

2015-06-09 Thread Junio C Hamano
Ariel Faigon github.2...@yendor.com writes: tcsh users who happen to have 'set noclobber' elsewhere in their ~/.tcshrc or ~/.cshrc startup files get a 'File exist' error, and the tcsh completion file doesn't get generated/updated. Adding a `!` in the redirect works correctly for both clobber

Re: format-patch and submodules

2015-06-09 Thread Jens Lehmann
Am 05.06.2015 um 01:20 schrieb Christopher Dunn: (Seen in git versions: 2.1.0 and 1.9.3 et al.) $ git format-patch --stdout X^..X | git apply check - fatal: unrecognized input This fails when the commit consists of nothing but a submodule change (as in 'git add submodule foo'), but it passes

[PATCH v3 2/7] send-email: allow aliases in patch header and command script outputs

2015-06-09 Thread Remi Lespinet
Interpret aliases in: - Header fields of patches generated by git format-patch (using --to, --cc, --add-header for example) or manually modified. Example of fields in header: To: alias1 Cc: alias2 Cc: alias3 - Outputs of command scripts specified by --cc-cmd

[PATCH v3 3/7] t9001-send-email: refactor header variable fields replacement

2015-06-09 Thread Remi Lespinet
Create a function which replaces Date, Message-Id and X-Mailer lines generated by git-send-email by a specific string Date:.*$ - Date: DATE-STRING Message-Id:.*$ - Message-Id: MESSAGE-ID-STRING X-Mailer:.*$ - X-Mailer: X-MAILER-STRING This is a preparatory for the next commit.

[PATCH v3 5/7] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-09 Thread Remi Lespinet
From: Jorge Juan Garcia Garcia jorge-juan.garcia-gar...@ensimag.imag.fr Accept a list of emails separated by commas in flags --cc, --to and --bcc. Multiple addresses can already be given by using these options multiple times, but it is more convenient to allow cutting-and-pasting a list of

[PATCH v3 4/7] send-email: refactor address list process

2015-06-09 Thread Remi Lespinet
Simplify code by creating a funct (comma separated, with aliases ...) into a simple list of valid email addresses. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- git-send-email.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git

[PATCH v7 0/5] Improving performance of git clean

2015-06-09 Thread Erik Elfström
Here is a reroll of this series (after much delay). Changes in v7: * changed order of file size and file open error check in read_gitfile * resolved conflicts with nd/multiple-work-trees. This removed the need for is_git_directory_gently that was added in v6 and simplified some error cases.

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

2015-06-09 Thread Remi Lespinet
Remove leading and trailing whitespaces when sanitizing addresses so that git send-email give the same output when passing arguments like j...@example.comor \t j...@example.com as with j...@example.com. The next commit will introduce a test for this aswell. Signed-off-by: Remi Lespinet

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

2015-06-09 Thread Jeff King
On Fri, Jun 05, 2015 at 08:29:21AM -0400, Jeff King wrote: On Fri, Jun 05, 2015 at 08:18:17AM -0400, Jeff King wrote: 1. Devise some torture to tests to see whether my patch series is in fact racy on Linux. 2. Assuming it is, scrap it and make a has_sha1_file_quick() which

[PATCH] git-completion.tcsh: fix redirect with noclobber

2015-06-09 Thread Ariel Faigon
tcsh users who happen to have 'set noclobber' elsewhere in their ~/.tcshrc or ~/.cshrc startup files get a 'File exist' error, and the tcsh completion file doesn't get generated/updated. Adding a `!` in the redirect works correctly for both clobber (default) and 'set noclobber' users. Helped-by:

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

2015-06-09 Thread hackerp
Thanks folks, I am digesting all you have said. Now the command line I can do (I'm a programmer) but the secretary here I doubt. So is there at GUI interface for this? Does it work on Windows systems? Thanks, Paul Stefan Beller sbel...@google.com wrote: Just because Git allows

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

2015-06-09 Thread Konstantin Khomoutov
On Tue, 9 Jun 2015 13:21:44 -0500 hack...@suddenlink.net wrote: Thanks folks, I am digesting all you have said. Now the command line I can do (I'm a programmer) but the secretary here I doubt. So is there at GUI interface for this? Does it work on Windows systems? That's why I asked

[PATCH v7 5/5] clean: improve performance when removing lots of directories

2015-06-09 Thread Erik Elfström
git clean uses resolve_gitlink_ref() to check for the presence of nested git repositories, but it has the drawback of creating a ref_cache entry for every directory that should potentially be cleaned. The linear search through the ref_cache list causes a massive performance hit for large number of

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

2015-06-09 Thread Stefan Beller
On Tue, Jun 9, 2015 at 11:21 AM, hack...@suddenlink.net wrote: Thanks folks, I am digesting all you have said. I did not intend to answer your original question, but to start a discussion on the feasibility of a dedicated git lock command. There are lots of things which are checked in

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: Besides, are you sure you don't want to substitute an empty rebase.instructionFormat' by '%s'? I would have expected to read ${format:-%s}` (note the colon), but then, this was Junio's suggestion... That was me simply being sloppy

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Mike Rappazzo
I have since reworked this script to support the short hash in the custom format as a special case: -git rev-list $merges_option --pretty=oneline --reverse --left-right --topo-order \ +format=$(git config --get rebase.instructionFormat) +no_format=$? +if test ${no_format} -ne 0 +then + format=%H

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

2015-06-09 Thread Louis-Alexandre Stuber
Matthieu Moy matthieu@grenoble-inp.fr wrote: I think you would want to error out if errno is not ENOENT. Junio C Hamano jch2...@gmail.com wrote: We might want to see why fopen() failed here. If it is because the file did not exist, great. But otherwise? This file is always supposed to

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

2015-06-09 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: --- a/git-bisect.sh +++ b/git-bisect.sh @@ -32,6 +32,8 @@ OPTIONS_SPEC= _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' _x40=$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40

Re: [PATCH v2 01/19] parse-options-cb: implement parse_opt_pass_strbuf()

2015-06-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: diff --git a/parse-options-cb.c b/parse-options-cb.c index be8c413..5b1dbcf 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -134,3 +134,32 @@ int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset) { return 0; }

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

2015-06-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: Certain git commands, such as git-pull, are simply wrappers around other git commands like git-fetch, git-merge and git-rebase. As such, these wrapper commands will typically need to pass through command-line options of the commands they wrap. Implement

Re: Fw: sort of a bug report - git rebase dropping empty commits

2015-06-09 Thread Hin-Tak Leung
Argh, thanks a lot! Should have read the man page better. OTOH, I expect 'git commit --allow-empty' being needed, but 'git rebase --keep-empty' comes somewhat as a surprise - I wasn't expecting git rebase to commit each in turn, but of course that's what it does. On 7 May 2015 at 01:47, Mikael

Re: On undoing a forced push

2015-06-09 Thread Duy Nguyen
On Tue, Jun 9, 2015 at 11:29 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Sorry to chime in so late in the discussion, but I think that the `--force-with-lease` option is what you are looking for. It allows you to force-push *but only* if the forced push would overwrite the ref

Re: [PATCH v2 09/19] pull: error on no merge candidates

2015-06-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: /** + * Appends merge candidates from FETCH_HEAD that are not marked not-for-merge + * into merge_heads. + */ Hmph, I vaguely recall doing that in C elsewhere already, even though I do not remember where offhand... +static void get_merge_heads(struct

Re: [PATCH v2 10/19] pull: support pull.ff config

2015-06-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: * Yup, I did mean strcmp(value, only) I may be missing some backstory behind this comment; in the patch, I instead see !strcmp(value, only) and I think it makes sense. + if (git_config_get_value(pull.ff, value)) + return; +

Re: [PATCH v2 05/19] pull: implement fetch + merge

2015-06-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: +/** + * Parses argv into [repo [refspecs...]], returning their values in `repo` + * as a string and `refspecs` as a null-terminated array of strings. If `repo` + * is not provided in argv, it is set to NULL. + */ +static void parse_repo_refspecs(int

Re: [PATCH v2 06/19] pull: pass verbosity, --progress flags to fetch and merge

2015-06-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: Re-implement support for this flag by introducing the option callback handler parse_opt_passthru(). This callback is used to pass the --progress or --no-progress command-line switch to git-fetch and git-merge. Forgot to rephrase? parse-opt-passthru() is a

Re: [RFC/PATCH 4/9] parse-options: add parse_opt_merge_filter()

2015-06-09 Thread Karthik Nayak
On 06/09/2015 12:50 AM, Junio C Hamano wrote: Karthik Nayak karthik@gmail.com writes: +int parse_opt_merge_filter(const struct option *opt, const char *arg, int unset) +{ + struct ref_filter *rf = opt-value; + unsigned char sha1[20]; + + rf-merge = opt-long_name[0] ==

Re: [RFC/PATCH 7/9] parse-options.h: add macros for '--contains' option

2015-06-09 Thread Karthik Nayak
On 06/09/2015 01:02 AM, Junio C Hamano wrote: Karthik Nayak karthik@gmail.com writes: +#define OPT_CONTAINS(filter, h) \ + { OPTION_CALLBACK, 0, contains, (filter), N_(commit), (h), \ + PARSE_OPT_LASTARG_DEFAULT, \ + parse_opt_with_commit, (intptr_t) HEAD \ + }

gitscm vs. git-scm

2015-06-09 Thread Michael J Gruber
Hi there, I (mis-) remembered the git site address and noticed that gitscm.com returns empty while git-scm.com is our beloved home. I thought, though, that we have a couple domains with redirects but I may be misremembering that also. Or DNS is hicking up. Cheers, Michael -- To unsubscribe from

Re: [msysGit] Re: Release candidate of Git for Windows 2.x is out

2015-06-09 Thread Johannes Schindelin
Hi, On 2015-06-09 14:10, QbProg wrote: I reproduce it using the windows command prompt (cmd.exe) using any repository. I tryed with bash and it works correctly. Please note that you removed enough context that the mail does not make sense anymore if read individually. At this point it might

On undoing a forced push

2015-06-09 Thread Duy Nguyen
From a thread on Hacker News. It seems that if a user does not have access to the remote's reflog and accidentally forces a push to a ref, how does he recover it? In order to force push again to revert it back, he would need to know the remote's old SHA-1. Local reflog does not help because remote

Re: [msysGit] Re: Release candidate of Git for Windows 2.x is out

2015-06-09 Thread Johannes Schindelin
Hi, On 2015-06-09 10:43, Qb wrote: I'm trying the release candidate on Win 8.1. Everything's working now, but when I clone a repository git clone http://./name.git CustomFolder it creates CustomFolder with the checkout files, but the .git folder is created inside

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

2015-06-09 Thread Matthieu Moy
Christian Couder christian.cou...@gmail.com writes: old/new is not more generic than good/bad. I disagree with this. In any case, we're looking for a pair of commits where one is a direct parent of the other. So in the end, there's always the old behavior and the new behavior in the end. In

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

2015-06-09 Thread Junio C Hamano
Mike Rappazzo rappa...@gmail.com writes: I have since reworked this script to support the short hash in the custom format as a special case: I thought that we always give short form when presenting it to the end user to edit, but for internal bookkeeping purposes we make sure that we use the

Re: On undoing a forced push

2015-06-09 Thread Duy Nguyen
On Tue, Jun 9, 2015 at 10:00 PM, brian m. carlson sand...@crustytoothpaste.net wrote: On Tue, Jun 09, 2015 at 07:12:21PM +0700, Duy Nguyen wrote: diff --git a/transport.c b/transport.c index f080e93..6bd6a64 100644 --- a/transport.c +++ b/transport.c @@ -657,16 +657,17 @@ static void

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

2015-06-09 Thread Junio C Hamano
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 (read_cache_unmerged()) +

Re: [PATCH v2 04/19] pull: implement skeletal builtin pull

2015-06-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: +int cmd_pull(int argc, const char **argv, const char *prefix) +{ + if (!getenv(_GIT_USE_BUILTIN_PULL)) { + const char *path = mkpath(%s/git-pull, git_exec_path()); + + if (sane_execvp(path, (char**) argv) 0) Style: (char

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

2015-06-09 Thread Junio C Hamano
Louis-Alexandre Stuber stub...@ensimag.grenoble-inp.fr writes: Matthieu Moy matthieu@grenoble-inp.fr wrote: I think you would want to error out if errno is not ENOENT. Junio C Hamano jch2...@gmail.com wrote: We might want to see why fopen() failed here. If it is because the file did

Re: [PATCH v2 13/19] pull: implement pulling into an unborn branch

2015-06-09 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: /** + * Pulls into void by branching off merge_head. + */ +static int pull_into_void(unsigned char merge_head[GIT_SHA1_RAWSZ], + unsigned char curr_head[GIT_SHA1_RAWSZ]) +{ It is not wrong per-se, but is rather unusual (and misleading) to

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

2015-06-09 Thread Junio C Hamano
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 pull.rebase. If value is a + * false value, returns REBASE_FALSE. If

Using clean/smudge scripts from repository

2015-06-09 Thread Bob Bell
I'm setting up a clean/smudge filter for a repository. In local testing it seemed to work well. To allow for the clean/smudge scripts to be updated as the source changes, I put the clean/smudge scripts into the repository, and configured the filter in my ~/.gitconfig file to be simply

  1   2   >