Re: [PATCHv2] branch -d: test if we can delete broken refs

2014-11-26 Thread Michael Haggerty
Aside from one tiny formatting nit (see below), the test looks good to me. On the other hand, this is kind of an aspirational test; I don't know that the tested functionality has ever worked or that anybody has ever claimed that it works. So my feeling is that the addition of the test would feel

Re: [PATCH 0/2] git-am: add --message-id/--no-message-id options

2014-11-26 Thread Paolo Bonzini
On 25/11/2014 22:21, Christian Couder wrote: On Tue, Nov 25, 2014 at 6:01 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 25/11/2014 17:27, Christian Couder wrote: From: Paolo Bonzini pbonz...@redhat.com This series adds a --message-id option to git-mailinfo and git-am. git-am also gets

Re: [PATCH 1/1] change contract between system_path and it's callers

2014-11-26 Thread Alexander Kuleshov
Maybe we will discard this patch, because i looked on it and tested with different places, it brings more leaks than before? 2014-11-26 9:53 GMT+06:00 Alexander Kuleshov kuleshovm...@gmail.com: Comparing this with what I sent out... builtin/help.c | 10 +++--- exec_cmd.c | 17

[PATCH] sha1_name: avoid unnecessary sha1 lookup in find_unique_abbrev

2014-11-26 Thread Mike Hommey
An example where this happens is when doing an ls-tree on a tree that contains a commit link. In that case, find_unique_abbrev is called to get a non-abbreviated hex sha1, but still, a lookup is done as to whether the sha1 is in the repository (which ends up looking for a loose object in

Re: git notes show is orders of magnitude slower than doing it manually with ls-tree and cat-file

2014-11-26 Thread Johan Herland
(First of all, thanks to both for great investigation and analysis) On Wed, Nov 26, 2014 at 5:46 AM, Jeff King p...@peff.net wrote: On Wed, Nov 26, 2014 at 11:25:53AM +0900, Mike Hommey wrote: Now, looking at the notes tree reflog, I see that at some point, some notes were added at the

Re: git notes show is orders of magnitude slower than doing it manually with ls-tree and cat-file

2014-11-26 Thread Mike Hommey
On Wed, Nov 26, 2014 at 12:46:20PM +0100, Johan Herland wrote: (First of all, thanks to both for great investigation and analysis) On Wed, Nov 26, 2014 at 5:46 AM, Jeff King p...@peff.net wrote: On Wed, Nov 26, 2014 at 11:25:53AM +0900, Mike Hommey wrote: Now, looking at the notes tree

Re: [PATCH 1/1] change contract between system_path and it's callers

2014-11-26 Thread Alexander Kuleshov
What do you think if we create int variable, something like given_config_must_free = 0; and will set up it to 1 in cases where it will be allocated, and than we can free it in the end of cmd_config? I'm reading git source code to understanding git internals and found little memory leak in

[PATCH 1/1] cat-file: fix a memory leak in cat_one_file

2014-11-26 Thread Alexander Kuleshov
Sometimes we should free output buffer in cat_one_file, but not always. It must to be freed only if it was allocated during git cat-file -t, commit,tag and tree types handling. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/cat-file.c | 13 - 1 file changed, 12

Extended splitting for git add --interactive

2014-11-26 Thread Ulrich Windl
Hi! This is for git-1.7.12 (an older version from the SLES11 SP3 SDK). If the issue is solved meanwhile, I'll be happy, and I apologize for being too lazy to find out. Currently Git cannot split a block of changes like -AAA -BBB +CCC +DDD Into -AAA +CCC and -BBB +DDD So you'll have to edit

RCS Keywords in Git done right

2014-11-26 Thread Derek Moore
Junio, et al., I've completed my first pass at RCS Keywords in Git. I believe I've come up with a solution that is accurate, performant and complete (but I have not tested it on big repos yet, I'm doing that today...). https://github.com/derekm/git-keywords This work basically takes advantage

Re: [PATCH 1/1] change contract between system_path and it's callers

2014-11-26 Thread Junio C Hamano
Alexander Kuleshov kuleshovm...@gmail.com writes: + setenv(INFOPATH, git_info_path, 1); + free(git_info_path); execlp(info, info, gitman, page, (char *)NULL); die(_(no info viewer handled the request)); We are just about to exec; does this warrant the code churn?

Re: [PATCH v2 0/7] repack_without_refs(): convert to string_list

2014-11-26 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: As this is in conflict with origin/sb/simplify-repack-without-refs we'd need to decide, which we'd take. I'd gladly go with this series as it seems cleaner and easier to read. I'll drop sb/simlify-repack-without-refs and replace it with this series

Re: RCS Keywords in Git done right

2014-11-26 Thread Stefan Beller
On Wed, Nov 26, 2014 at 8:44 AM, Derek Moore derek.p.mo...@gmail.com wrote: Junio, et al., I've completed my first pass at RCS Keywords in Git. I believe I've come up with a solution that is accurate, performant and complete (but I have not tested it on big repos yet, I'm doing that

Re: [PATCH 1/2] t7503: use write_script to generate hook scripts

2014-11-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Tue, Nov 25, 2014 at 11:51:28PM +0100, Øystein Walle wrote: Signed-off-by: Øystein Walle oys...@gmail.com --- t/t7503-pre-commit-hook.sh | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/t/t7503-pre-commit-hook.sh

Re: [PATCH 0/2] pre-commit hook updates

2014-11-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Tue, Nov 25, 2014 at 11:51:27PM +0100, Øystein Walle wrote: I agree with Junio Hamano that it's better to provide no argument at all rather than an empty one. I also agree with Jeff King that noamend is better than an empty argument. I went with the second

[PATCHv3] branch -d: test if we can delete broken refs

2014-11-26 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Changes v1-v2 * relocated the test from t1402 to t3200 * reword the commit message title to fit in with similar commits touching t/t3200-branch.sh

Re: [PATCHv2] branch -d: test if we can delete broken refs

2014-11-26 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: ... On the other hand, this is kind of an aspirational test; I don't know that the tested functionality has ever worked or that anybody has ever claimed that it works. So my feeling is that the addition of the test would feel more natural in the

Re: [PATCH] sha1_name: avoid unnecessary sha1 lookup in find_unique_abbrev

2014-11-26 Thread Junio C Hamano
Mike Hommey m...@glandium.org writes: An example where this happens is when doing an ls-tree on a tree that contains a commit link. In that case, find_unique_abbrev is called to get a non-abbreviated hex sha1, but still, a lookup is done as to whether the sha1 is in the repository (which ends

Re: [PATCH 0/2] pre-commit hook updates

2014-11-26 Thread Jeff King
On Wed, Nov 26, 2014 at 10:35:22AM -0800, Junio C Hamano wrote: I _think_ give only info that is necessary is cleaner as an interface in theory, but have two niggles myself: 1. the hooks must do the argument parsing loop (you already mentioned this); 2. the hooks cannot tell if the

Re: Extended splitting for git add --interactive

2014-11-26 Thread Junio C Hamano
Ulrich Windl ulrich.wi...@rz.uni-regensburg.de writes: This is for git-1.7.12 (an older version from the SLES11 SP3 SDK). If the issue is solved meanwhile, I'll be happy, and I apologize for being too lazy to find out. The answer is no ;-). Currently Git cannot split a block of changes like

Re: [PATCH 1/2] t7503: use write_script to generate hook scripts

2014-11-26 Thread Jeff King
On Wed, Nov 26, 2014 at 10:12:08AM -0800, Junio C Hamano wrote: +write_script $HOOK EOF While you are touching this line, please make it \EOF. It does not matter for these simple cases, but as a style, we try to avoid interpolation unless it is necessary. Thanks. It is more about

Re: RCS Keywords in Git done right

2014-11-26 Thread Derek Moore
Now knowing the edge cases won't work, I did not get an idea about the standard case of what should work with this. Would you mind to write a more detailed example or a more advertising paragraph of what this can do? Not getting the big picture may be related to me having not worked with RCS

Why does git merge --squash fail when merge.ff is set to only?

2014-11-26 Thread Paul Smith
In our development process we always want to do rebase and only rarely create merge commits, and so we have a recommendation to set the merge.ff configuration attribute to only. This is great, however it appears to break git merge --squash (which we also use constantly). If I'm squash-merging

Re: [PATCH 1/2] t7503: use write_script to generate hook scripts

2014-11-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Wed, Nov 26, 2014 at 10:12:08AM -0800, Junio C Hamano wrote: +write_script $HOOK EOF While you are touching this line, please make it \EOF. It does not matter for these simple cases, but as a style, we try to avoid interpolation unless it is

[PATCH v4] Add another option for receive.denyCurrentBranch

2014-11-26 Thread Johannes Schindelin
When synchronizing between working directories, it can be handy to update the current branch via 'push' rather than 'pull', e.g. when pushing a fix from inside a VM, or when pushing a fix made on a user's machine (where the developer is not at liberty to install an ssh daemon let alone know the

Re: Extended splitting for git add --interactive

2014-11-26 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Ulrich Windl ulrich.wi...@rz.uni-regensburg.de writes: Another split that is not possible is a split across an empty line, like: +AAA + empty line (in reality) +BBB Likewise. An empty line is not that special. AAA may be adding one block of

[PATCH v4] git-new-workdir: Don't fail if the target directory is empty

2014-11-26 Thread Paul Smith
Allow new workdirs to be created in an empty directory (similar to git clone). Provide more error checking and clean up on failure. Signed-off-by: Paul Smith p...@mad-scientist.net --- Hopefully this doesn't contain unwanted stylistic changes. There's a kind of gross thing about the behavior

hallo

2014-11-26 Thread hi
Weihnachten kommt, wir halten eine gro?e Aktivit?t in dieser Woche, der Preis für iphone 6plus ist 420euro.very amzing ipad, Samsung s5 . w eb : loo. comN�Р骒r��yb�X�肚�v�^�)藓{.n�+丕��≤�}��财�z�j:+v�����赙zZ+��+zf"�h���~i���z��wア�?�ㄨ���)撷f

[PATCH v4] Support updating working trees when pushing into non-bare repos

2014-11-26 Thread Johannes Schindelin
This patch series adds support for a new receive.denyCurrentBranch setting to update the working directory (which must be clean, i.e. there must not be any uncommitted changes) when pushing into the current branch. The scenario in which the 'updateInstead' setting became a boon in this

Re: [PATCH v4] Add another option for receive.denyCurrentBranch

2014-11-26 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: +Another option is updateInstead which will update the working +directory (must be clean) if pushing into the current branch. This option is +intended for synchronizing working directories when one side is not easily +accessible via

git file listing is inconsistent

2014-11-26 Thread Woody Gilk
git diff --name-only git grep --files-with-matches I think --files-with-matches should be deprecated and replaced with --name-only for consistency. Thanks, -- Woody Gilk http://about.me/shadowhand -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: tag scheme

2014-11-26 Thread Rick Umali
On Tue, Nov 25, 2014 at 12:09:42PM -0500, Jeff King wrote: On Tue, Nov 25, 2014 at 05:17:52PM +0100, Carsten Mattner wrote: I'm looking for advice on a tagging scheme, especially pros/cons of using a 'v' prefix as in v2.1.0 like git does. My impression is that using a common prefix for

Re: RCS Keywords in Git done right

2014-11-26 Thread Stefan Beller
On Wed, Nov 26, 2014 at 11:22 AM, Derek Moore derek.p.mo...@gmail.com wrote: Now knowing the edge cases won't work, I did not get an idea about the standard case of what should work with this. Would you mind to write a more detailed example or a more advertising paragraph of what this can do?

Re: [PATCH] RelNotes: Spelling grammar tweaks.

2014-11-26 Thread Junio C Hamano
Thanks. -- 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: Why does git merge --squash fail when merge.ff is set to only?

2014-11-26 Thread Junio C Hamano
Paul Smith p...@mad-scientist.net writes: In our development process we always want to do rebase and only rarely create merge commits, and so we have a recommendation to set the merge.ff configuration attribute to only. This is great, however it appears to break git merge --squash (which we

Re: git file listing is inconsistent

2014-11-26 Thread Junio C Hamano
Woody Gilk woody.g...@gmail.com writes: git diff --name-only git grep --files-with-matches I think --files-with-matches should be deprecated and replaced with --name-only for consistency. That longer name comes from GNU grep consistency. Why anybody does not use a shorter and sweeter grep

Re: [PATCH v4] git-new-workdir: Don't fail if the target directory is empty

2014-11-26 Thread Junio C Hamano
Paul Smith p...@mad-scientist.net writes: Allow new workdirs to be created in an empty directory (similar to git clone). Provide more error checking and clean up on failure. Signed-off-by: Paul Smith p...@mad-scientist.net --- Hopefully this doesn't contain unwanted stylistic changes.

Re: git file listing is inconsistent

2014-11-26 Thread Jonathan Nieder
Hi Woody, Woody Gilk wrote: git diff --name-only git grep --files-with-matches I think --files-with-matches should be deprecated and replaced with --name-only for consistency. See the (non-git) diff(1) and grep(1) manpages. It might make sense for 'git grep' to learn --name-only too as a

Re: git file listing is inconsistent

2014-11-26 Thread Scott Schmit
On Wed, Nov 26, 2014 at 03:10:33PM -0600, Woody Gilk wrote: git diff --name-only git grep --files-with-matches I think --files-with-matches should be deprecated and replaced with --name-only for consistency. git grep supports both: --name-only for consistency with other git commands, and

Re: git file listing is inconsistent

2014-11-26 Thread Woody Gilk
Jonathan, On Wed, Nov 26, 2014 at 3:55 PM, Jonathan Nieder jrnie...@gmail.com wrote: Actually, 'git grep -h' tells me that git grep --name-only is already accepted as a synonym for --files-with-matches, ever since You are absolutely right, it was a typo (and then not RTFM the resulting help)

'simple' push check that branch name matches does not work if push.default is unset (and hence implicitly simple)

2014-11-26 Thread Adam Williamson
Hi, folks. Ran into an unfortunate issue with git which helped me mess up a Fedora package repo today :/ The problem can be reproduced thus: 1. Create an empty repo, clone it 2. Push its master branch with something in it (just to get started) 3. git branch --track moo origin/master 4. git

Re: [PATCH v4] git-new-workdir: Don't fail if the target directory is empty

2014-11-26 Thread Paul Smith
On Wed, 2014-11-26 at 13:55 -0800, Junio C Hamano wrote: The comment in the original is somewhat misleading, but test -e was test -e and not test -d to stop when an existing file was given by mistake as $new_workdir, I think. I do not know what happens in the new code in that case. I did

Re: 'simple' push check that branch name matches does not work if push.default is unset (and hence implicitly simple)

2014-11-26 Thread Adam Williamson
On Wed, 2014-11-26 at 14:29 -0800, Adam Williamson wrote: Hi, folks. Ran into an unfortunate issue with git which helped me mess up a Fedora package repo today :/ The problem can be reproduced thus: Whoops, I missed step 0: 0. Ensure push.default is not configured globally 1. Create an

[PATCH v5] Add another option for receive.denyCurrentBranch

2014-11-26 Thread Johannes Schindelin
When synchronizing between working directories, it can be handy to update the current branch via 'push' rather than 'pull', e.g. when pushing a fix from inside a VM, or when pushing a fix made on a user's machine (where the developer is not at liberty to install an ssh daemon let alone know the

[PATCH v5] Support updating working trees when pushing into non-bare repos

2014-11-26 Thread Johannes Schindelin
This patch series adds support for a new receive.denyCurrentBranch setting to update the working directory (which must be clean, i.e. there must not be any uncommitted changes) when pushing into the current branch. The scenario in which the 'updateInstead' setting became a boon in this

Reminder

2014-11-26 Thread user
I work with One Track. Are you the user email? It is important you get back to me -- 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

A note from the maintainer

2014-11-26 Thread Junio C Hamano
Welcome to the Git development community. This message is written by the maintainer and talks about how Git project is managed, and how you can work with it. * Mailing list and the community The development is primarily done on the Git mailing list. Help requests, feature proposals, bug reports

What's cooking in git.git (Nov 2014, #04; Wed, 26)

2014-11-26 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. I haven't had time to write comments (they are essentially release notes entries to be used when/if the topic graduates to 'master') for new

Re: [PATCH v4] git-new-workdir: Don't fail if the target directory is empty

2014-11-26 Thread Junio C Hamano
Paul Smith p...@mad-scientist.net writes: This is what happens for a file: $ rm -f foo $ touch foo $ ./src/git/contrib/workdir/git-new-workdir src/git foo master mkdir: cannot create directory ‘foo’: Not a directory unable to create new workdir foo! ;-) That comes from mkdir || fail

[ANNOUNCE] Git v2.2.0

2014-11-26 Thread Junio C Hamano
The latest feature release Git v2.2 is now available at the usual places. Big thanks go to 77 contributors, among which 20 are new people, who made 550+ changes in total since Git v2.1 was released. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/ The following

Re: [PATCH 0/2] git-am: add --message-id/--no-message-id options

2014-11-26 Thread Christian Couder
On Wed, Nov 26, 2014 at 10:07 AM, Paolo Bonzini bonz...@gnu.org wrote: On 25/11/2014 22:21, Christian Couder wrote: On Tue, Nov 25, 2014 at 6:01 PM, Paolo Bonzini pbonz...@redhat.com wrote: As far as I understand, all the git-am hooks are called on the commit rather than the incoming email:

Re: [PATCH 1/1] cat-file: fix a memory leak in cat_one_file

2014-11-26 Thread Jonathan Nieder
Hi, Alexander Kuleshov wrote: [Subject: cat-file: fix a memory leak in cat_one_file] Can you explain further? How did you run into this? Is it an unbounded leak or a small one-time leak? What is the benefit of applying this patch? By code inspection is a fine answer to the question of how

Where is the best place to report a security vulnerability in git?

2014-11-26 Thread Hugh Davenport
-- 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: Where is the best place to report a security vulnerability in git?

2014-11-26 Thread Jonathan Nieder
Hi Hugh, Hugh Davenport wrote: Where is the best place to report a security vulnerability in git? Current practice is to contact Junio C Hamano gits...@pobox.com. Cc-ing Jeff King p...@peff.net isn't a bad idea while at it. We should probably set up a mailing list to make this more obvious,

Re: Where is the best place to report a security vulnerability in git?

2014-11-26 Thread Hugh Davenport
Thanks. Will send a report their way soon On 27 November 2014 2:20:53 pm NZDT, Jonathan Nieder jrnie...@gmail.com wrote: Hi Hugh, Hugh Davenport wrote: Where is the best place to report a security vulnerability in git? Current practice is to contact Junio C Hamano gits...@pobox.com. Cc-ing

Re: Where is the best place to report a security vulnerability in git?

2014-11-26 Thread Sitaram Chamarty
On 11/27/2014 06:50 AM, Jonathan Nieder wrote: Hi Hugh, Hugh Davenport wrote: Where is the best place to report a security vulnerability in git? Current practice is to contact Junio C Hamano gits...@pobox.com. Cc-ing Jeff King p...@peff.net isn't a bad idea while at it. We should

Re: 'simple' push check that branch name matches does not work if push.default is unset (and hence implicitly simple)

2014-11-26 Thread Jeff King
On Wed, Nov 26, 2014 at 02:29:28PM -0800, Adam Williamson wrote: Hi, folks. Ran into an unfortunate issue with git which helped me mess up a Fedora package repo today :/ The problem can be reproduced thus: 1. Create an empty repo, clone it 2. Push its master branch with something in it

Re: 'simple' push check that branch name matches does not work if push.default is unset (and hence implicitly simple)

2014-11-26 Thread Adam Williamson
On November 26, 2014 7:43:06 PM PST, Jeff King p...@peff.net wrote: On Wed, Nov 26, 2014 at 02:29:28PM -0800, Adam Williamson wrote: Hi, folks. Ran into an unfortunate issue with git which helped me mess up a Fedora package repo today :/ The problem can be reproduced thus: 1. Create an

[PATCH] pack-bitmap: do not use gcc packed attribute

2014-11-26 Thread Jeff King
On Wed, Nov 26, 2014 at 03:09:45PM -0800, Junio C Hamano wrote: * jk/pack-bitmap (2014-08-04) 1 commit - pack-bitmap: do not use gcc packed attribute Hold, waiting for Karsten's replacement. I got tired of waiting, so here it is, I hope good enough for inclusion. -- 8 -- From: Karsten

[PATCH 0/4] Using transactions for the reflog

2014-11-26 Thread Stefan Beller
This is the core part of the refs-transactions-reflog series[1], which was in discussion for a bit already. The idea is to have the reflog being part of the transactions, which the refs are already using, so the we're moving towards a database like API in the long run. This makes git easier to

[PATCH 2/4] refs.c: add a new update_type field to ref_update

2014-11-26 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add a field that describes what type of update this refers to. For now the only type is UPDATE_SHA1 but we will soon add more types. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 27

[PATCH 1/4] refs.c: rename the transaction functions

2014-11-26 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Rename the transaction functions. Remove the leading ref_ from the names and append _ref to the names for functions that create/delete/ update sha1 refs. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com

[PATCH 4/4] reflog.c: use a reflog transaction when writing during expire

2014-11-26 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Use a transaction for all updates during expire_reflog. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 85 1 file

[PATCH 3/4] refs.c: add a transaction function to append a reflog entry

2014-11-26 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Define a new transaction update type, UPDATE_LOG, and a new function transaction_update_reflog. This function will lock the reflog and append an entry to it during transaction commit. We can pass a flag to this function, which can truncate the the reflog

Re: [PATCH 1/1] cat-file: fix a memory leak in cat_one_file

2014-11-26 Thread Eric Sunshine
On Wed, Nov 26, 2014 at 7:24 PM, Jonathan Nieder jrnie...@gmail.com wrote: Alexander Kuleshov wrote: [...] +++ b/builtin/cat-file.c @@ -68,9 +69,14 @@ static int cat_one_file(int opt, const char +buf_must_free = 1; + -if (!buf) +if (!buf) { +free(buf);