[PATCH v3 2/2] blame: use a helper to get suitable blame_date_width

2014-04-21 Thread Jiang Xin
When show date in relative date format for git-blame, the max display width of datetime is set as the length of the string Thu Oct 19 16:00:04 2006 -0700 (30 characters long). But actually the max width for C locale is only 22 (the length of string x years, xx months ago). And for other locale,

[PATCH v3 1/2] bugfix: fix broken time_buf paddings for git-blame

2014-04-21 Thread Jiang Xin
Command `git blame --date relative` aligns the date field with a fixed-width (defined by blame_date_width), and if time_str is shorter than that, it adds spaces for padding. But there are two bugs in the following codes: time_len = strlen(time_str); ... memset(time_buf +

[PATCH v3 0/2] peroper align of datetime filed of git-blame

2014-04-21 Thread Jiang Xin
Changes since v2: * Fixed typos in commit log 1/2. Thanks, Eric. * With the help of Junio, write a helper to get suitable blame_date_width. Jiang Xin (2): bugfix: fix broken time_buf paddings for git-blame blame: use a helper to get suitable blame_date_width builtin/blame.c | 85

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Eric Sunshine
On Sun, Apr 20, 2014 at 10:23 PM, Felipe Contreras felipe.contre...@gmail.com wrote: This hook is invoked whenever a branch is updated, either when a branch is created or updated with 'git branch', or when it's rebased with 'git rebase'. It receives two parameters; the name of the branch, and

general question about git

2014-04-21 Thread Miller, Hugh
I am interested in exploring the possibility of using versioning for data, that is versioning non-text, non-code file sets. Typical examples are the data files or project files used by some application. These file sets typically contain binary files; these files can be somewhat large, 1GB to

Re: general question about git

2014-04-21 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 21, 2014 at 3:17 PM, Miller, Hugh hughmil...@chevron.com wrote: I am interested in exploring the possibility of using versioning for data, that is versioning non-text, non-code file sets. Typical examples are the data files or project files used by some application. These file

Re: [PATCH v3 2/2] blame: use a helper to get suitable blame_date_width

2014-04-21 Thread Junio C Hamano
Jiang Xin worldhello@gmail.com writes: When show date in relative date format for git-blame, the max display width of datetime is set as the length of the string Thu Oct 19 16:00:04 2006 -0700 (30 characters long). But actually the max width for C locale is only 22 (the length of string

Re: [PATCH 0/2] remote-helpers: graduate

2014-04-21 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: There doesn't seem to be any reason to keep these remote-helpers in the contrib area. Yay. I wouldn't phrase it doesn't seem to be any reason, though. The decision to include is not done due to lack of negatives, but because adding them

Re: security vulnerability disclosure procedure?

2014-04-21 Thread Shawn Pearce
On Sun, Apr 20, 2014 at 1:42 PM, Richard Hansen rhan...@bbn.com wrote: I have discovered a minor security vulnerability. I could send the patch to the mailing list, but I wanted someone else to take a look first just to make sure it's minor enough that folks will think it's OK to publicly

Re: [msysGit] Re: Re: [ANNOUNCE] WinGit - native x86/x64 Git for Windows

2014-04-21 Thread Sebastian Schuberth
On 21.04.2014 00:10, Johannes Schindelin wrote: tests do not pass yet. (I also would like to look into getting the performance improvement Hannes Sixt achieved by his patch [*1*] into mingwGitDevEnv's Git installation, too.) Whoops. Footnote *1*:

Re: [PATCH 2/2] remote-helpers: move tests out of contrib

2014-04-21 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: They should be tested by default. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/Makefile| 14 -- t/Makefile

Re: [PATCH 07/11] commit.c: use ref transactions for updates

2014-04-21 Thread Ronnie Sahlberg
On Sat, Apr 19, 2014 at 12:23 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 04/17/2014 09:46 PM, Ronnie Sahlberg wrote: Change commit.c to use ref transactions for all ref updates. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/commit.c | 22 -- 1

Re: [msysGit] Re: Re: [ANNOUNCE] WinGit - native x86/x64 Git for Windows

2014-04-21 Thread Johannes Schindelin
Hi Sebastian, On Mon, 21 Apr 2014, Sebastian Schuberth wrote: On 21.04.2014 00:10, Johannes Schindelin wrote: tests do not pass yet. (I also would like to look into getting the performance improvement Hannes Sixt achieved by his patch [*1*] into mingwGitDevEnv's Git installation, too.)

Re: [PATCH 2/2] remote-helpers: move tests out of contrib

2014-04-21 Thread Felipe Contreras
Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: They should be tested by default. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/Makefile| 14 -- t/Makefile

Re: [msysGit] Re: Re: [ANNOUNCE] WinGit - native x86/x64 Git for Windows

2014-04-21 Thread Felipe Contreras
Johannes Schindelin wrote: Now, clearly you have all the motivation that is needed to get 64-bit builds of Git for Windows going, and all the motivation required to make sure that the MSVC support of the msysGit project works. s/msysGit/Git/ Personally I don't see why ideally I shouldn't be

Re: [PATCH v3 2/2] blame: use a helper to get suitable blame_date_width

2014-04-21 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: What I am wondering is if we can do something like this: ... Nah, that is a lot more stupid than just doing In code: blame_date_width = strtoul(_(4 years, 11 months ago), NULL, 10) + 1; In git.pot: #. This string is used

Re: [PATCH 2/2] remote-helpers: move tests out of contrib

2014-04-21 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: This step needs a bit more work, I am afraid, to at least have these three test scripts follow the same numbering scheme. Especially given that there were recent discussions on allowing a range of tests to be run (or omitted) via notations

Re: What is missing from Git v2.0

2014-04-21 Thread Sebastian Schuberth
On 21.04.2014 00:41, Felipe Contreras wrote: = Default aliases = Every single version control tool out there has default aliases (e.g. co = checkout) except Git. Every argument against default aliases was basically refuted, yet my patches went nowhere. And the users still expect these

Re: [PATCH 2/2] remote-helpers: move tests out of contrib

2014-04-21 Thread Felipe Contreras
Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: This step needs a bit more work, I am afraid, to at least have these three test scripts follow the same numbering scheme. Especially given that there were recent discussions on allowing a range of tests to be run

Re: What is missing from Git v2.0

2014-04-21 Thread Junio C Hamano
Sebastian Schuberth sschube...@gmail.com writes: Every argument against default aliases was basically refuted, yet my patches went nowhere. And the users still expect these aliases. +1 about having default aliases in general, and I'd also add these: I think it might be OK to implement them

Re: What is missing from Git v2.0

2014-04-21 Thread Felipe Contreras
Sebastian Schuberth wrote: On 21.04.2014 00:41, Felipe Contreras wrote: = Default aliases = Every single version control tool out there has default aliases (e.g. co = checkout) except Git. Every argument against default aliases was basically refuted, yet my patches went nowhere.

Re: What is missing from Git v2.0

2014-04-21 Thread Sebastian Schuberth
On Mon, Apr 21, 2014 at 9:34 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I have these aliases as well, except br = b, and cp = pi. 'br' is probably better, but not sure as 'cp' which can be confusing. If by confusing you refer to cp to copy files, that's actually what I like about

[SECURITY PATCH] git-prompt.sh: don't put unsanitized branch names in $PS1

2014-04-21 Thread Richard Hansen
Both bash and zsh subject the value of PS1 to parameter expansion, command substitution, and arithmetic expansion. Rather than include the raw, unescaped branch name in PS1 when running in two- or three-argument mode, construct PS1 to reference a variable that holds the branch name. Because the

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Ilya Bobyr
On 4/20/2014 7:23 PM, Felipe Contreras wrote: This hook is invoked whenever a branch is updated, either when a branch is created or updated with 'git branch', or when it's rebased with 'git rebase'. It receives two parameters; the name of the branch, and the SHA-1 of the latest commit,

Re: [SECURITY PATCH] git-prompt.sh: don't put unsanitized branch names in $PS1

2014-04-21 Thread Jeff King
On Mon, Apr 21, 2014 at 03:07:28PM -0400, Richard Hansen wrote: Both bash and zsh subject the value of PS1 to parameter expansion, command substitution, and arithmetic expansion. Rather than include the raw, unescaped branch name in PS1 when running in two- or three-argument mode, construct

Re: What is missing from Git v2.0

2014-04-21 Thread Theodore Ts'o
On Mon, Apr 21, 2014 at 09:47:57PM +0200, Sebastian Schuberth wrote: On Mon, Apr 21, 2014 at 9:34 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I have these aliases as well, except br = b, and cp = pi. 'br' is probably better, but not sure as 'cp' which can be confusing. If by

[PATCH v2 0/3] remote-helpers: graduate

2014-04-21 Thread Felipe Contreras
There doesn't seem to be any reason to keep these remote-helpers in the contrib area. Felipe Contreras (3): remote-helpers: squelch python import exceptions remote-helpers: move out of contrib remote-helpers: move tests out of contrib .gitignore

[PATCH v2 2/3] remote-helpers: move out of contrib

2014-04-21 Thread Felipe Contreras
The remote-helpers in contrib/remote-helpers have proved to work, be reliable, and stable. It's time to move them out of contrib, and be distributed by default. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- .gitignore | 2 ++

[PATCH v2 1/3] remote-helpers: squelch python import exceptions

2014-04-21 Thread Felipe Contreras
When the python modules are not present we get an unwanted message: *** prove *** test-bzr.sh .. Traceback (most recent call last): File string, line 1, in module File /usr/local/buildtools/current/sitecustomize/sitecu... return real_import(name, globals, locals,

[PATCH v2 3/3] remote-helpers: move tests out of contrib

2014-04-21 Thread Felipe Contreras
They should be tested by default. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/remote-helpers/Makefile| 14 -- contrib/remote-helpers/test-hg.sh = t/t5810-remote-hg.sh | 3 +-- .../test-hg-bidi.sh = t/t5811-remote-hg-bidi.sh

Re: What is missing from Git v2.0

2014-04-21 Thread Felipe Contreras
Theodore Ts'o wrote: On Mon, Apr 21, 2014 at 09:47:57PM +0200, Sebastian Schuberth wrote: On Mon, Apr 21, 2014 at 9:34 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I have these aliases as well, except br = b, and cp = pi. 'br' is probably better, but not sure as 'cp'

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Felipe Contreras
Ilya Bobyr wrote: On 4/20/2014 7:23 PM, Felipe Contreras wrote: This hook is invoked whenever a branch is updated, either when a branch is created or updated with 'git branch', or when it's rebased with 'git rebase'. It receives two parameters; the name of the branch, and the SHA-1 of the

Re: [SECURITY PATCH] git-prompt.sh: don't put unsanitized branch names in $PS1

2014-04-21 Thread Richard Hansen
On 2014-04-21 16:24, Jeff King wrote: On Mon, Apr 21, 2014 at 03:07:28PM -0400, Richard Hansen wrote: Both bash and zsh subject the value of PS1 to parameter expansion, command substitution, and arithmetic expansion. Rather than include the raw, unescaped branch name in PS1 when running in

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Ilya Bobyr
On 4/21/2014 1:49 PM, Felipe Contreras wrote: Ilya Bobyr wrote: On 4/20/2014 7:23 PM, Felipe Contreras wrote: This hook is invoked whenever a branch is updated, either when a branch is created or updated with 'git branch', or when it's rebased with 'git rebase'. It receives two parameters;

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Ilya Bobyr
On 4/20/2014 7:23 PM, Felipe Contreras wrote: [...] diff --git a/t/t5408-update-branch-hook.sh b/t/t5408-update-branch-hook.sh new file mode 100755 index 000..d921c0e --- /dev/null +++ b/t/t5408-update-branch-hook.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +test_description='Test the

Re: [PATCH v4 1/2] add: add --ignore-submodules[=when] parameter

2014-04-21 Thread Ronald Weiss
On 18. 4. 2014 13:53, Jens Lehmann wrote: Am 13.04.2014 00:45, schrieb Ronald Weiss: Allow ignoring submodules (or not) by command line switch, like diff and status do. Git add currently doesn't honor ignore from .gitmodules or .git/config, which is related functionality, however I'd like to

Re: [PATCH v2 2/3] remote-helpers: move out of contrib

2014-04-21 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: contrib/remote-helpers/test-bzr.sh | 2 +- contrib/remote-helpers/test-hg-bidi.sh | 2 +- contrib/remote-helpers/test-hg-hg-git.sh | 4 ++-- contrib/remote-helpers/test-hg.sh

[PATCH] Revert Stop starting pager recursively

2014-04-21 Thread Jörn Engel
This reverts commit 88e8f908f2b0c56f9ccf8134d8ff9f689af9cc84. Caused a usability regression for me and foul language for my coworkers. In particular, I commonly do a git log, with results going through less, find a potentially interesting commit and execute git show commit from less. This used

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Felipe Contreras
Ilya Bobyr wrote: On 4/20/2014 7:23 PM, Felipe Contreras wrote: [...] diff --git a/t/t5408-update-branch-hook.sh b/t/t5408-update-branch-hook.sh new file mode 100755 index 000..d921c0e --- /dev/null +++ b/t/t5408-update-branch-hook.sh @@ -0,0 +1,39 @@ +#!/bin/sh +

Re: [PATCH 11/11] walker.c: use ref transaction for ref updates

2014-04-21 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 04/17/2014 09:46 PM, Ronnie Sahlberg wrote: Switch to using ref transactions in walker_fetch(). As part of the refactoring to use ref transactions we also fix a potential memory leak where in the original code if write_ref_sha1() would fail

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Felipe Contreras
Ilya Bobyr wrote: Also, most have names that start with either pre- or post-. It seems reasonable for both pre-update-branch and post-update-branch to exist. I don't see what would be the point in that. This one would be pre-update-branch, I guess. I was also wondering about git reset.

Re: [PATCH v2 2/3] remote-helpers: move out of contrib

2014-04-21 Thread Felipe Contreras
Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: contrib/remote-helpers/test-bzr.sh | 2 +- contrib/remote-helpers/test-hg-bidi.sh | 2 +- contrib/remote-helpers/test-hg-hg-git.sh | 4 ++--

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Ilya Bobyr
On 4/21/2014 2:15 PM, Felipe Contreras wrote: Ilya Bobyr wrote: On 4/20/2014 7:23 PM, Felipe Contreras wrote: [...] diff --git a/t/t5408-update-branch-hook.sh b/t/t5408-update-branch-hook.sh new file mode 100755 index 000..d921c0e --- /dev/null +++ b/t/t5408-update-branch-hook.sh @@

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Ilya Bobyr
On 4/21/2014 2:17 PM, Felipe Contreras wrote: Ilya Bobyr wrote: Also, most have names that start with either pre- or post-. It seems reasonable for both pre-update-branch and post-update-branch to exist. I don't see what would be the point in that. Do you see the point in the other hooks

Re: [PATCH v2 2/3] remote-helpers: move out of contrib

2014-04-21 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: Does this change relate to the moving of main scripts, and if so how? Yes. Before the scripts were not generated, the shebang was '/usr/bin/env python', that means if the user doesn't have 'python' but 'python2' git-remote-hg would fail,

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Felipe Contreras
Ilya Bobyr wrote: On 4/21/2014 2:15 PM, Felipe Contreras wrote: Ilya Bobyr wrote: On 4/20/2014 7:23 PM, Felipe Contreras wrote: [...] diff --git a/t/t5408-update-branch-hook.sh b/t/t5408-update-branch-hook.sh new file mode 100755 index 000..d921c0e --- /dev/null +++

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Felipe Contreras
Ilya Bobyr wrote: On 4/21/2014 2:17 PM, Felipe Contreras wrote: Ilya Bobyr wrote: Also, most have names that start with either pre- or post-. It seems reasonable for both pre-update-branch and post-update-branch to exist. I don't see what would be the point in that. Do you see the

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Junio C Hamano
Ilya Bobyr ilya.bo...@gmail.com writes: On 4/21/2014 2:17 PM, Felipe Contreras wrote: Ilya Bobyr wrote: Also, most have names that start with either pre- or post-. It seems reasonable for both pre-update-branch and post-update-branch to exist. I don't see what would be the point in that.

Re: [PATCH v4 2/2] commit: add --ignore-submodules[=when] parameter

2014-04-21 Thread Ronald Weiss
On 18. 4. 2014 14:09, Jens Lehmann wrote: Am 13.04.2014 00:49, schrieb Ronald Weiss: Allow ignoring submodules (or not) by command line switch, like diff and status do. Git commit honors the 'ignore' setting from .gitmodules or .git/config, but didn't allow to override it from command line.

[NOT_A_PATCH] A naive attempt to cross-build Linux-mingw64 Git

2014-04-21 Thread Marat Radchenko
config.mak.uname: provide a way to explicitely request MinGW build. This is required to perform Linux-MinGW crosscompilation. --- Personally I don't see why ideally I shouldn't be able to build upstream Git for Windows with mingw without leaving my Linux system. One day you might be able, but

Re: [SECURITY PATCH] git-prompt.sh: don't put unsanitized branch names in $PS1

2014-04-21 Thread Junio C Hamano
Richard Hansen rhan...@bbn.com writes: Both bash and zsh subject the value of PS1 to parameter expansion, command substitution, and arithmetic expansion. Rather than include the raw, unescaped branch name in PS1 when running in two- or three-argument mode, construct PS1 to reference a

Re: [PATCH 11/11] walker.c: use ref transaction for ref updates

2014-04-21 Thread Ronnie Sahlberg
I have updated the commit message with some text why I do not think this change is critical for this case. I will resend v2 of the patch series in a little while. On Sat, Apr 19, 2014 at 12:48 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 04/17/2014 09:46 PM, Ronnie Sahlberg wrote: Switch

Re: [SECURITY PATCH] git-prompt.sh: don't put unsanitized branch names in $PS1

2014-04-21 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Richard Hansen rhan...@bbn.com writes: Both bash and zsh subject the value of PS1 to parameter expansion, command substitution, and arithmetic expansion. Rather than include the raw, unescaped branch name in PS1 when running in two- or

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Felipe Contreras
Ilya Bobyr wrote: On Mon, Apr 21, 2014 at 2:35 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Ilya Bobyr wrote: test_expect_success 'setup' mkdir -p .git/hooks cat .git/hooks/update-branch -\\EOF #!/bin/sh echo \$@ .git/update-branch.args

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Felipe Contreras
Junio C Hamano wrote: Ilya Bobyr ilya.bo...@gmail.com writes: On 4/21/2014 2:17 PM, Felipe Contreras wrote: Ilya Bobyr wrote: Also, most have names that start with either pre- or post-. It seems reasonable for both pre-update-branch and post-update-branch to exist. I don't see

[PATCH v2 03/13] refs.c: change ref_transaction_update() to do error checking and return status

2014-04-21 Thread Ronnie Sahlberg
Update ref_transaction_update() do some basic error checking and return true on error. Update all callers to check ref_transaction_update() for error. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/update-ref.c | 10 ++ refs.c | 9 +++-- refs.h

[PATCH v2 00/13] Use ref transactions from most callers

2014-04-21 Thread Ronnie Sahlberg
This patch series changes most of the places where the ref functions for locking and writing refs to instead use the new ref transaction API. There are still three more places where write_ref_sha1() is called from outside of refs.c but those all will require more complex work and review so those

[PATCH v2 04/13] refs.c: change ref_transaction_create to do error checking and return status

2014-04-21 Thread Ronnie Sahlberg
Do basic error checking in ref_transaction_create() and make it return status. Update all callers to check the result of ref_transaction_create() Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/update-ref.c | 4 +++- refs.c | 17 +++-- refs.h

[PATCH v2 07/13] replace.c: use the ref transaction functions for updates

2014-04-21 Thread Ronnie Sahlberg
Update replace.c to use ref transactions for updates. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/replace.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c index b62420a..b91e550 100644 ---

[PATCH v2 02/13] refs.c: use a single exit path from transaction commit and handle onerr

2014-04-21 Thread Ronnie Sahlberg
Update ref_transaction_commit to have a single exit path and process onerr if an error occured during hte commit. This does mean that in case of an error occuring for UPDATE_REFS_MSG_ON_ERR during the calls to update_ref_lock or update_ref_write we will log errors from both those functions as well

[PATCH v2 05/13] refs.c: ref_transaction_delete to check for error and return status

2014-04-21 Thread Ronnie Sahlberg
Change ref_transaction_delete() to do basic error checking and return status. Update all callers to check the return for ref_transaction_delete() Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/update-ref.c | 5 +++-- refs.c | 15 ++- refs.h

[PATCH v2 12/13] walker.c: use ref transaction for ref updates

2014-04-21 Thread Ronnie Sahlberg
Switch to using ref transactions in walker_fetch(). As part of the refactoring to use ref transactions we also fix a potential memory leak where in the original code if write_ref_sha1() would fail we would end up returning from the function without free()ing the msg string. This changes the

[PATCH v2 10/13] fast-import.c: change update_branch to use ref transactions

2014-04-21 Thread Ronnie Sahlberg
Change update_branch() to use ref transactions for updates. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- fast-import.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/fast-import.c b/fast-import.c index fb4738d..466dfe3 100644 ---

[PATCH v2 01/13] refs.c: constify the sha arguments for ref_transaction_create|delete|update

2014-04-21 Thread Ronnie Sahlberg
ref_transaction_create|delete|update has no need to modify the sha1 arguments passed to it so it should use const unsigned char* instead of unsigned char*. Some functions, such as fast_forward_to(), already have its old/new sha1 arguments as consts. This function will at some point need to use

[PATCH v2 09/13] sequencer.c: use ref transactions for all ref updates

2014-04-21 Thread Ronnie Sahlberg
Change to use ref transactions for all updates to refs. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- sequencer.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sequencer.c b/sequencer.c index bde5f04..fa14ac0 100644 --- a/sequencer.c +++

[PATCH v2 06/13] tag.c: use ref transactions when doing updates

2014-04-21 Thread Ronnie Sahlberg
Change tag.c to use ref transactions for all ref updates. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/tag.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index 40356e3..3c40957 100644 --- a/builtin/tag.c +++

[PATCH v2 08/13] commit.c: use ref transactions for updates

2014-04-21 Thread Ronnie Sahlberg
Change commit.c to use ref transactions for all ref updates. Make sure we pass a NULL pointer to ref_transaction_update if have_old is false. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/commit.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-)

[PATCH v2 11/13] branch.c: use ref transaction for all ref updates

2014-04-21 Thread Ronnie Sahlberg
Change branch.c to use ref transactions when doing updates. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- branch.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/branch.c b/branch.c index 660097b..45c7766 100644 --- a/branch.c +++ b/branch.c @@

[PATCH v2 13/13] refs.c: change update_ref to use a transaction

2014-04-21 Thread Ronnie Sahlberg
Change the update_ref helper function to use a ref transaction internally. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/refs.c b/refs.c index 878948a..e52b6bf 100644 --- a/refs.c

Re: [SECURITY PATCH] git-prompt.sh: don't put unsanitized branch names in $PS1

2014-04-21 Thread Richard Hansen
On 2014-04-21 18:33, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Richard Hansen rhan...@bbn.com writes: Both bash and zsh subject the value of PS1 to parameter expansion, command substitution, and arithmetic expansion. Rather than include the raw, unescaped branch name

Re: [RTC/PATCH] Add 'update-branch' hook

2014-04-21 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: ... there are _already_ hooks without pre/post. Like commit-msg? Yes, it would have been nicer if it were named verify-commit-message or something. Old mistakes are harder to change because of inertia. It is not a good excuse to knowingly

[SECURITY PATCH v2] git-prompt.sh: don't put unsanitized branch names in $PS1

2014-04-21 Thread Richard Hansen
Both bash and zsh subject the value of PS1 to parameter expansion, command substitution, and arithmetic expansion. Rather than include the raw, unescaped branch name in PS1 when running in two- or three-argument mode, construct PS1 to reference a variable that holds the branch name. Because the

RE: [NOT_A_PATCH] A naive attempt to cross-build Linux-mingw64 Git

2014-04-21 Thread Felipe Contreras
Marat Radchenko wrote: config.mak.uname: provide a way to explicitely request MinGW build. This is required to perform Linux-MinGW crosscompilation. --- Personally I don't see why ideally I shouldn't be able to build upstream Git for Windows with mingw without leaving my Linux system.

Re: [PATCH] tag: add -i and --introduced modifier for --contains

2014-04-21 Thread Luis R. Rodriguez
On Fri, Apr 18, 2014 at 4:36 PM, Junio C Hamano gits...@pobox.com wrote: Luis R. Rodriguez mcg...@do-not-panic.com writes: I think ultimately this reveals that given that tags *can* be arbitrary and subjective,... Yes; see the part at the bottom. Commit A can be described in terms of both

Re: gitignore vs. exclude vs assume-unchanged?

2014-04-21 Thread Andrew Ardill
On 18 April 2014 10:36, a...@bellandwhistle.net wrote: Like the $GIT_DIR/info/exclude file, gitignore files specify intentionally untracked files that Git should ignore. The difference is that files matched by a pattern in a gitignore file will be untracked for all users of the repository.

[PATCH] git.c: treat RUN_SETUP_GENTLY and RUN_SETUP as mutually exclusive

2014-04-21 Thread Luis R. Rodriguez
From: Luis R. Rodriguez mcg...@suse.com This saves us a few branches when RUN_SETUP is set up. Signed-off-by: Luis R. Rodriguez mcg...@suse.com --- git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.c b/git.c index 9efd1a3..7780572 100644 --- a/git.c +++ b/git.c @@

Re: Git in GSoC 2014

2014-04-21 Thread Andrew Ardill
Congrats everyone who was successful in being picked for this year's GSoC. Fabian with Line options for git rebase --interactive [0] Brian Gesiak with Unify and Refactor Temporary File Handling [1] Tanay Abhra with Git configuration API improvements [2] I look forward to seeing how you go! [0]

Re: Git in GSoC 2014

2014-04-21 Thread Brian Gesiak
Thank you! I'm very excited to be participating in this year's GSoC. Google recommends that students use the next few weeks to get to know their mentors, read documentation, and get up to speed to begin working on their projects. Students have also received instructions on submitting tax forms

Open Source Organizational Culture

2014-04-21 Thread Marius Storm-Olsen
Hi, I would like to request your participation in a survey on Open Source Organizational Culture, which will provide valuable insight into how Open Source projects are run, how their participants act, how they might change going forward, and how particular Open Source projects compare with

Open Source Organizational Culture

2014-04-21 Thread Marius Storm-Olsen
Hi, I would like to request your participation in a survey on Open Source Organizational Culture, which will provide valuable insight into how Open Source projects are run, how their participants act, how they might change going forward, and how particular Open Source projects compare with

Re: [PATCH] tag: add -i and --introduced modifier for --contains

2014-04-21 Thread W. Trevor King
On Mon, Apr 21, 2014 at 05:38:34PM -0700, Luis R. Rodriguez wrote: [0] mcgrof@ergon ~/linux (git::master)$ git log c5905afb..v3.5| grep ^commit | wc -l 24878 [1] mcgrof@ergon ~/linux (git::master)$ git log c5905afb..v3.4| grep ^commit | wc -l 13106 [2] mcgrof@ergon ~/linux (git::master)$

Re: Open Source Organizational Culture

2014-04-21 Thread Marius Storm-Olsen
On 4/21/2014 9:45 PM, Marius Storm-Olsen wrote: I would like to request your participation in a survey on Open Source Organizational Culture, which will provide valuable insight into how Open Source projects are run, how their participants act, how they might change going forward, and

Re: [PATCH 2/2] mergetool: run prompt only if guessed tool

2014-04-21 Thread David Aguilar
[Cc:ing Charles in case he has an opinion, this behavior dates back to the original MT] On Sun, Apr 20, 2014 at 07:17:34PM -0500, Felipe Contreras wrote: It's annoying to see the prompt: Hit return to start merge resolution tool (foo): Every time the user does 'git mergetool' even if

Re: [PATCH] mergetools: add vimdiff3 mode

2014-04-21 Thread David Aguilar
On Sun, Apr 20, 2014 at 07:24:20PM -0500, Felipe Contreras wrote: It's similar to the default, except that the other windows are hidden. This ensures that removed/added colors are still visible on the main merge window, but the other windows not visible. Specially useful with

Re: What is missing from Git v2.0

2014-04-21 Thread David Aguilar
On Sun, Apr 20, 2014 at 05:41:05PM -0500, Felipe Contreras wrote: = Reject non-fast-forward pulls by default = Many new-comers end up making merges by mistake when they pull because they don't understand what is a non-fast-forward and what they should actually be doing. Most people, even

Re: What is missing from Git v2.0

2014-04-21 Thread Felipe Contreras
brian m. carlson wrote: On Mon, Apr 21, 2014 at 09:24:33PM +0200, Sebastian Schuberth wrote: BTW, in my experience people tend to stick to predefined aliases instead of redefining them to something (completely) different. This means that having default aliases will very likely enable one to

Re: Open Source Organizational Culture

2014-04-21 Thread Felipe Contreras
Marius Storm-Olsen wrote: On 4/21/2014 9:45 PM, Marius Storm-Olsen wrote: I would like to request your participation in a survey on Open Source Organizational Culture, which will provide valuable insight into how Open Source projects are run, how their participants act, how they

Re: What is missing from Git v2.0

2014-04-21 Thread Felipe Contreras
David Aguilar wrote: On Sun, Apr 20, 2014 at 05:41:05PM -0500, Felipe Contreras wrote: = Reject non-fast-forward pulls by default = Many new-comers end up making merges by mistake when they pull because they don't understand what is a non-fast-forward and what they should actually be