format-patch and submodules

2015-06-04 Thread 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 when a file change is added to the same commit.

Pack files, standards compliance, and efficiency

2015-06-04 Thread brian m. carlson
There was discussion sometime back about the object_id conversions and handling direct offsets in pack files. In some places in sha1_file.c, we return direct pointers to the SHA-1 values in the mmap'd pack file and use those in other parts of the code. However, with the object_id conversion, we

Re: [RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Allen Hubbe
On Thu, Jun 4, 2015 at 6:53 PM, Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr wrote: On Thu, Jun 4, 2015 at 1:17 PM, Remi LESPINET remi.lespi...@ensimag.grenoble-inp.fr wrote: Hi, Working on git-send-email, I've seen that there's no aliases support when manually adding a recipient in

Re: [RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Allen Hubbe
On Thu, Jun 4, 2015 at 8:38 PM, Allen Hubbe alle...@gmail.com wrote: On Thu, Jun 4, 2015 at 6:53 PM, Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr wrote: On Thu, Jun 4, 2015 at 1:17 PM, Remi LESPINET remi.lespi...@ensimag.grenoble-inp.fr wrote: Hi, Working on git-send-email, I've

AW: Re*: AW: Getting the full path of a conflicting file within a custom merge driver?

2015-06-04 Thread Gondek, Andreas
Thanks, thanks, thanks. One last question. If I don't want to compile Git myself, how long may the pu branch take approx. to get into a next release? Mit freundlichen Grüßen Andreas Gondek Applications Deutsche WertpapierService Bank AG ITTAS Derendorfer Allee

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

2015-06-04 Thread Jonathan Kamens
I'm writing about the patch that Jeff King submitted on April 22, in 20150422193101.gc27...@peff.net, in particular, https://github.com/git/git/commit/ed178ef13a26136d86ff4e33bb7b1afb5033f908 . It appears that this patch was included in git 2.4.2, and it breaks my workflow. In particular, I

Re: [RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Stefan Beller
On Thu, Jun 4, 2015 at 1:17 PM, Remi LESPINET remi.lespi...@ensimag.grenoble-inp.fr wrote: Hi, Working on git-send-email, I've seen that there's no aliases support when manually adding a recipient in a 'To' or 'Cc' field in a patch and for the --to-cmd and --cc-cmd. I would like to add

[PATCH v5 1/3] git-am.sh: fix initialization of the threeway variable

2015-06-04 Thread Remi Lespinet
Initialization for the threeway variable was missing. This caused a behavior change for command lines like: threeway=t git am ... This commit adds initialization for this variable. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- git-am.sh | 1 + 1 file changed, 1

[PATCH v5 2/3] t4150-am: refactor am -3 tests

2015-06-04 Thread Remi Lespinet
Create a setup for git am -3 in a separate test instead of creating this setup each time. This prepares for the next commit which will use this setup as well. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- t/t4150-am.sh | 32 ++-- 1 file

[PATCH v5 3/3] git-am: add am.threeWay config variable

2015-06-04 Thread Remi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- Only one

Re: [PATCH v2 1/2] extract setting of wt_status.commitable flag out of wt_status_print_updated()

2015-06-04 Thread Junio C Hamano
Tay Ray Chuan rcta...@gmail.com writes: It may not be obvious from its name that wt_status_print_updated() that it also sets wt_status.commitable, which affects commit functionality. Extract this out into a separate function for improved clarity, though at the expense of executing another

Re*: AW: Getting the full path of a conflicting file within a custom merge driver?

2015-06-04 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Gondek, Andreas andreas.gon...@dwpbank.de writes: thank you for responding this fast. I would suggest providing this information as an additional parameter (like %A %O %B and %L) maybe %P. Yes, per-cent plus a letter is more in line with the way

[RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Remi Lespinet
On Thu, Jun 4, 2015 at 1:17 PM, Remi LESPINET remi.lespi...@ensimag.grenoble-inp.fr wrote: Hi, Working on git-send-email, I've seen that there's no aliases support when manually adding a recipient in a 'To' or 'Cc' field in a patch and for the --to-cmd and --cc-cmd. I would like to add

Re: [RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Eric Sunshine
On Thu, Jun 4, 2015 at 5:11 PM, Stefan Beller sbel...@google.com wrote: On Thu, Jun 4, 2015 at 1:17 PM, Remi LESPINET remi.lespi...@ensimag.grenoble-inp.fr wrote: Working on git-send-email, I've seen that there's no aliases support when manually adding a recipient in a 'To' or 'Cc' field in a

[RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Remi Lespinet
On Thu, Jun 4, 2015 at 5:11 PM, Stefan Beller sbel...@google.com wrote: On Thu, Jun 4, 2015 at 1:17 PM, Remi LESPINET remi.lespi...@ensimag.grenoble-inp.fr wrote: Working on git-send-email, I've seen that there's no aliases support when manually adding a recipient in a 'To' or 'Cc' field

Re: [PATCH] index-pack: fix truncation of off_t in comparison

2015-06-04 Thread Junio C Hamano
Jeff King p...@peff.net writes: On top of nd/slim-index-pack-memory-usage, which introduced the bug (but it is already in master). Thanks. In this round, I decided to deliberately merge more iffy and larger topics to 'master' in early part of the cycle, and it seems to be paying off nicely

Re: [PATCH v2 0/2] make commit --verbose work with --no-status

2015-06-04 Thread Junio C Hamano
Tay Ray Chuan rcta...@gmail.com writes: When running git-commit`, --verbose appends a diff to the prepared message, while --no-status omits git-status output. The --verbose option is called --verbose and not --diff or --patch for a reason, though. The default is to show extra information as

Re: [PATCH 1/2] test for '!' handling in rev-parse's named commits

2015-06-04 Thread Junio C Hamano
Will Palmer wmpal...@gmail.com writes: What I'm thinking now is that @^{/foo} can be thought of as a potential shorthand-form of what could be @^{/!(m=foo)}, in which case @^{/!-foo} could similarly be thought of as a potential shorthand-form of what could be @^{/!(m-foo)}. Ah, our messages

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

2015-06-04 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: +void get_two_last_lines(char *filename, int *numlines, char **lines) +{ +... +} + +void get_two_first_lines(char *filename, int *numlines, char **lines) +{ +... +} I had a handful of comments on these: - Do we need two separate and

[PATCH v2 2/2] make commit --verbose work with --no-status

2015-06-04 Thread Tay Ray Chuan
When running git-commit`, --verbose appends a diff to the prepared message, while --no-status omits git-status output; thus, one would expect --verbose --no-status to give a commit message with a diff of the commit without git-status output. However, this is not what happens - the prepared commit

[PATCH v2 1/2] extract setting of wt_status.commitable flag out of wt_status_print_updated()

2015-06-04 Thread Tay Ray Chuan
It may not be obvious from its name that wt_status_print_updated() that it also sets wt_status.commitable, which affects commit functionality. Extract this out into a separate function for improved clarity, though at the expense of executing another loop. Signed-off-by: Tay Ray Chuan

[PATCH v2 0/2] make commit --verbose work with --no-status

2015-06-04 Thread Tay Ray Chuan
When running git-commit`, --verbose appends a diff to the prepared message, while --no-status omits git-status output; thus, one would expect --verbose --no-status to give a commit message with a diff of the commit without git-status output. However, this is not what happens - the prepared commit

Re: [RFC] git-am: handling unborn branches

2015-06-04 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: git-am generally supports applying patches to unborn branches. However, there are 2 cases where git-am does not handle unborn branches which I would like to address before the git-am rewrite to C: 1. am --skip For git am --skip, git-am.sh does a

Re: [RFC] git-am: handling unborn branches

2015-06-04 Thread Stefan Beller
On Thu, Jun 4, 2015 at 3:34 AM, Paul Tan pyoka...@gmail.com wrote: Hi, git-am generally supports applying patches to unborn branches. However, there are 2 cases where git-am does not handle unborn branches which I would like to address before the git-am rewrite to C: 1. am --skip For git

Re: [WIP PATCH 1/3] git bisect old/new

2015-06-04 Thread Junio C Hamano
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: From: Christian Couder chrisc...@tuxfamily.org 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

Re: [RFC/WIP PATCH 00/11] Protocol version 2, again!

2015-06-04 Thread Stefan Beller
On Thu, Jun 4, 2015 at 6:09 AM, Jeff King p...@peff.net wrote: On Mon, Jun 01, 2015 at 10:49:45AM -0700, Stefan Beller wrote: However the client side with builtin/fetch, builtin/fetch-pack, fetch-pack is a bit of a mystery to me, as I cannot fully grasp the difference between * connect.{h,c}

Re: [PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-06-04 Thread Junio C Hamano
On Thu, Jun 4, 2015 at 4:42 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 06/04/2015 10:40 AM, Johannes Sixt wrote: We *certainly* don't require high-quality random numbers for this application. Regarding portability, there is one definite point in favor of rand() (it's available on

Re: [RFC/WIP PATCH 11/11] Document protocol version 2

2015-06-04 Thread Junio C Hamano
Jeff King p...@peff.net writes: We should definitely _not_ add anything that scales with the repository size. For instance, the symref field only shows the HEAD now. That's OK, as it's constant size. I agree that this is an easy-to-explain rule to keep the design sensible. We do not show

[PATCH/RFC v4 3/3] git-am: add am.threeWay config variable

2015-06-04 Thread Remi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr ---

[PATCH/RFC v4 1/3] git-am.sh: fix initialization of the threeway variable

2015-06-04 Thread Remi Lespinet
Initialization for the threeway variable was missing. This caused a behavior change for command lines like: threeway=t git am ... This commit adds initialization for this variable. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- git-am.sh | 1 + 1 file changed, 1

Patch alerts

2015-06-04 Thread Carl Brooks
Hello, is there anywhere on the web that displays git's latest security alerts Sent from iPhone-- 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/RFC v4 3/3] git-am: add am.threeWay config variable

2015-06-04 Thread Matthieu Moy
Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes: @@ -90,10 +90,13 @@ default. You can use `--no-utf8` to override this. -3:: --3way:: +--no-3way:: When the patch does not apply cleanly, fall back on 3-way merge if the patch records the identity of blobs

[PATCH/RFC v4 2/3] t4150-am: refactor am -3 tests

2015-06-04 Thread Remi Lespinet
Create a setup for git am -3 in a separate test instead of creating this setup each time. This prepares for the next commit which will use this setup as well. Signed-off-by: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr --- t/t4150-am.sh | 32 ++-- 1 file

Re: [PATCH] log: diagnose empty HEAD more clearly

2015-06-04 Thread Stefan Näwe
Am 03.06.2015 um 19:24 schrieb Junio C Hamano: Jeff King p...@peff.net writes: My concern there would be risk of regression. I.e., that we would take some case which used to error out and turn it into a silent noop. So I'd prefer to keep the behavior the same, and just modify the error code

Re: [GSoC] Week 1: Unification of 'for-each-ref', 'tag -l' and 'branch -l'

2015-06-04 Thread Karthik Nayak
On 06/04/2015 02:38 AM, Jeff King wrote: On Wed, Jun 03, 2015 at 06:08:50PM +0200, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com writes: Matthieu Moy suggested that I work on the unification of these commands let both the implementations stay where the user can select the

Re: Suggestion: make git checkout safer

2015-06-04 Thread Ed Avis
Stefan Beller sbeller at google.com writes: So in one mode, we do actually warn about contents going missing, and the other mode is designed to actually make things go missing without any warning. I think this is a big part of the issue. Two rather different operations are given the name

Re: Suggestion: make git checkout safer

2015-06-04 Thread Ed Avis
Ed Avis eda at waniasset.com writes: Julio H. asked how I had learned to run 'git checkout .'. Sorry it was Torsten B. who asked that. But yes, I think it was just word of mouth. -- Ed Avis e...@waniasset.com -- To unsubscribe from this list: send the line unsubscribe git in the body of a

[RFC] git-am: handling unborn branches

2015-06-04 Thread Paul Tan
Hi, git-am generally supports applying patches to unborn branches. However, there are 2 cases where git-am does not handle unborn branches which I would like to address before the git-am rewrite to C: 1. am --skip For git am --skip, git-am.sh does a fast-forward checkout from HEAD to HEAD,

Re: Suggestion: make git checkout safer

2015-06-04 Thread Ed Avis
Kevin Daudt me at ikke.info writes: If people execute git checkout . as a habbit without thinking, they will soon train to do git checkout -f . without thinking, and then you still have the same problem. I don't quite agree; you only learn to use the -f flag if the plain command doesn't do what

Re: Permission denied ONLY after pulling bundles

2015-06-04 Thread Christian Couder
Hi, On Thu, Jun 4, 2015 at 3:04 PM, Rossella Barletta rossella.barle...@gmail.com wrote: Dear git group, I would like to ask your help for a problem that we cannot fix in any way. We have a git repository in folder on Windows. Then we use VMware player on CentOS_6 on which we create a

Re: Permission denied ONLY after pulling bundles

2015-06-04 Thread Philip Oakley
From: Christian Couder christian.cou...@gmail.com Hi, On Thu, Jun 4, 2015 at 3:04 PM, Rossella Barletta rossella.barle...@gmail.com wrote: Dear git group, I would like to ask your help for a problem that we cannot fix in any way. We have a git repository in folder on Windows. Then we use

Re: [WIP PATCH 1/3] git bisect old/new

2015-06-04 Thread Matthieu Moy
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: @@ -732,18 +736,25 @@ static void handle_bad_merge_base(void) if (is_expected_rev(current_bad_oid)) { char *bad_hex = oid_to_hex(current_bad_oid); char *good_hex = join_sha1_array_hex(good_revs,

Re: [WIP PATCH 1/3] git bisect old/new

2015-06-04 Thread Christian Couder
On Thu, Jun 4, 2015 at 9:59 AM, Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr wrote: From: Christian Couder chrisc...@tuxfamily.org 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'.

Re: [PATCH] log: diagnose empty HEAD more clearly

2015-06-04 Thread Jeff King
On Wed, Jun 03, 2015 at 10:24:02AM -0700, Junio C Hamano wrote: Which is what led me to say Why are we defaulting to HEAD before checking if it even exists? Isn't that the root cause of this confusion? What happens if we stopped doing it? And I think the diagnose after finding that

[WIP PATCH 1/3] git bisect old/new

2015-06-04 Thread Antoine Delaite
From: Christian Couder chrisc...@tuxfamily.org 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

[PATCH 3/3] bisect: fix indentation

2015-06-04 Thread Antoine Delaite
From: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr --- bisect.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bisect.c b/bisect.c index 68417bb..87a5f6d 100644 --- a/bisect.c +++ b/bisect.c @@

Re: Minor bug report

2015-06-04 Thread Jeff King
On Wed, Jun 03, 2015 at 05:39:14PM +0200, Dennis Kaarsemaker wrote: On di, 2015-06-02 at 23:48 -0700, Junio C Hamano wrote: I am kind of surprised after reading these two threads that my take on this issue has changed over time, as my knee-jerk reaction before reading them was the

[PATCH 2/3] bisect: use name_(bad|good) instead of bisect_(bad|good)

2015-06-04 Thread Antoine Delaite
From: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr --- bisect.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/bisect.c b/bisect.c index d6c19fd..68417bb 100644 ---

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

2015-06-04 Thread Matthieu Moy
Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr writes: + (use git rebase --edit-todo to view and edit) You're still missing double-quotes around git rebase --edit-todo. Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr writes: +Last command(s) done (1 command(s) done): Can't

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

2015-06-04 Thread Matthieu Moy
I'd swap 3/4 and 4/4 so that we see the impact of your code on these new tests. I won't insist on that though. Please help reviewers by explaining in the commit message why these tests are needed (what was not covered properly by existing tests?) Guillaume Pagès

Re: [PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-06-04 Thread Johannes Sixt
Am 30.05.2015 um 19:12 schrieb Junio C Hamano: Johannes Sixt j...@kdbg.org writes: There you have it: Look the other way for a while, and people start using exotic stuff... ;) Is it exotic to have random/srandom? Both are in POSIX and 4BSD; admittedly rand/srand are written down in C89 and

Re: [PATCH] log: diagnose empty HEAD more clearly

2015-06-04 Thread Jeff King
On Thu, Jun 04, 2015 at 09:31:04AM +0200, Stefan Näwe wrote: + if (!rev-pending.nr !opt-def) + die(you do not have a commit yet on your branch); I am not a native english speaker but shouldn't this be: you do not have a commit on your branch yet Both are fine, as is:

Re: Suggestion: make git checkout safer

2015-06-04 Thread John Szakmeister
On Wed, Jun 3, 2015 at 5:29 PM, Junio C Hamano gits...@pobox.com wrote: [snip] [Footnote] *1* In the context of this discussion, after screwing up the change in hello.c, instead of expressing the wish to recover and to start from scratch in two separate commands, i.e. rm

[PATCH] index-pack: fix truncation of off_t in comparison

2015-06-04 Thread Jeff King
Commit c6458e6 (index-pack: kill union delta_base to save memory, 2015-04-18) refactored the comparison functions used in sorting and binary searching our delta list. The resulting code does something like: int cmp_offsets(off_t a, off_t b) { return a - b; } This works most of

Re: [PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-06-04 Thread Michael Haggerty
On 06/04/2015 10:40 AM, Johannes Sixt wrote: Am 30.05.2015 um 19:12 schrieb Junio C Hamano: Johannes Sixt j...@kdbg.org writes: There you have it: Look the other way for a while, and people start using exotic stuff... ;) Is it exotic to have random/srandom? Both are in POSIX and 4BSD;

Re: [PATCH/WIP 1/8] wrapper: implement xopen()

2015-06-04 Thread Paul Tan
On Thu, May 28, 2015 at 3:03 AM, Torsten Bögershausen tbo...@web.de wrote: On 2015-05-27 15.33, Paul Tan wrote: +/** + * xopen() is the same as open(), but it die()s if the open() fails. + */ +int xopen(const char *path, int flags, mode_t mode) +{ + int fd; + + assert(path); +

[RFC] send-email aliases when editing patches or using --xx-cmd

2015-06-04 Thread Remi LESPINET
Hi, Working on git-send-email, I've seen that there's no aliases support when manually adding a recipient in a 'To' or 'Cc' field in a patch and for the --to-cmd and --cc-cmd. I would like to add this support, and I wonder if there are reasons not to do it. Thanks. -- To unsubscribe from this

Re: Suggestion: make git checkout safer

2015-06-04 Thread Torsten Bögershausen
On 2015-06-04 13.00, Ed Avis wrote: Updates files in the working tree to match... I think that this had been written with git checkout branch in mind, which is different from git checkout -- paths (or git checkout .) Do you think you can write a patch to improve the documentation ? --

Permission denied ONLY after pulling bundles

2015-06-04 Thread Rossella Barletta
Dear git group, I would like to ask your help for a problem that we cannot fix in any way. We have a git repository in folder on Windows. Then we use VMware player on CentOS_6 on which we create a clone of the git repository, after of course having mounted the directory in which the repository

Re: [RFC/WIP PATCH 00/11] Protocol version 2, again!

2015-06-04 Thread Jeff King
On Mon, Jun 01, 2015 at 10:49:45AM -0700, Stefan Beller wrote: However the client side with builtin/fetch, builtin/fetch-pack, fetch-pack is a bit of a mystery to me, as I cannot fully grasp the difference between * connect.{h,c} * remote.{h.c} * transport.{h.c} there. All of it seems to

Re: [PATCH] index-pack: fix truncation of off_t in comparison

2015-06-04 Thread Duy Nguyen
On Thu, Jun 4, 2015 at 7:35 PM, Jeff King p...@peff.net wrote: Commit c6458e6 (index-pack: kill union delta_base to save memory, 2015-04-18) refactored the comparison functions used in sorting and binary searching our delta list. The resulting code does something like: int

Re: [RFC/WIP PATCH 11/11] Document protocol version 2

2015-06-04 Thread Jeff King
On Mon, Jun 01, 2015 at 04:40:54PM -0700, Stefan Beller wrote: Thinking about this further, maybe it is a good idea to restrict the capabilities advertising to alphabetical order? This seems like an unnecessary restriction. The main impetus seems to be: So how does parse_capability scale

Re: [PATCH/RFC v3 2/4] git-am.txt: add configuration section in git am documentation

2015-06-04 Thread Remi Lespinet
Matthieu Moy matthieu@grenoble-inp.fr writes +CONFIGURATION +- + +am.keepcr:: +If true, git-am will call git-mailsplit for patches in mbox format `git am` `git mailsplit` +with parameter '--keep-cr'. In this case git-mailsplit will