Git doesn't notice file has changed (Re: Found a bug in git 1.9.0 but can't reproduce it without copyrighted source code.)

2014-03-27 Thread Jonathan Nieder
(cc-ing msysgit list, where there are more Windows-knowledgeable people) yun sheng wrote: On Fri, Mar 28, 2014 at 9:40 AM, Jonathan Nieder jrnie...@gmail.com wrote: yun sheng wrote: these two files have the same timestamp, the same size, bug slightly different contents. How did they get

Re: fast-import deltas

2014-04-01 Thread Jonathan Nieder
Junio C Hamano wrote: Assuming that you do have and are willing to read the original file, you have three possible (and one impractical) approaches: [...] - Apply the foreign changes to the original file yourself, and feed the resulting content to fast-import in full, letting fast-import

Re: git-status -- trying to understand all possible states

2014-04-01 Thread Jonathan Nieder
Michael Toy wrote: https://gist.github.com/the-michael-toy/9907309 Two nits: - Please use --porcelain (implied by -z in the absence of another format option) instead of --short. --short is meant to be human readable and details of the output might change some day. - Depending on what

Re: [PATCH v9 11/11] Documentation: add documentation for 'git interpret-trailers'

2014-04-01 Thread Jonathan Nieder
` arguments, if any, to this +message. The resulting message is emited on the standard output. Do you have an example? Does it work like this? $ git interpret-trailers 'signoff=Jonathan Nieder jrnie...@gmail.com' EOF foo bar baz qux EOF foo bar baz qux Signed

Re: [PATCH V2 0/7] fix hunk editing with 'commit -p -m'

2014-04-03 Thread Jonathan Nieder
Hi, A quick note for the future: Benoit Pierre wrote: This patch fixes the fact that hunk editing with 'commit -p -m' does not work: GIT_EDITOR is set to ':' to indicate to hooks that no editor will be launched, which result in the 'hunk edit' option not launching the editor (and selecting

Re: Patch Series v3 for use the $( ... ) construct for command substitution

2014-04-04 Thread Jonathan Nieder
Hi, Elia Pinto wrote: This patch series contain the use the $( ... ) construct for command substitution patches not already merged in ep/shell-command-substitution in the mantainer repository. Thanks for working on this. The $() form is less error-prone than ``, so in that sense it can

Re: Patch Series v3 for use the $( ... ) construct for command substitution

2014-04-04 Thread Jonathan Nieder
Matthieu Moy wrote: Jonathan Nieder jrnie...@gmail.com writes: If the script is obviously correct enough then there is no need to manually go through 140 files after that point. The script cannot be obviously correct, as there are a lot of potential corner-cases (nested `, nesting ` within

Re: [PATCH] Unicode: update of combining code points

2014-04-07 Thread Jonathan Nieder
Hi, Torsten Bögershausen wrote: Unicode 6.3 defines the following code as combining or accents, git_wcwidth() should return 0. Earlier unicode standards had defined these code point as reserved: Thanks for the update. Could the commit message also explain how this was noticed and what the

Re: Our official home page and logo for the Git project

2014-04-11 Thread Jonathan Nieder
Junio C Hamano wrote: In any case, this motion is not about let's declare the logo we see on git-scm.com today as _the_ official one. Phew. :) [...] Please help us by letting us answer Yup, that is a logo (among others) that represents our project, and we are OK with you using

Re: [PATCH 1/6] compat/regex/regcomp.c: reduce scope of variables

2014-04-16 Thread Jonathan Nieder
Hi, Elia Pinto wrote: [Subject: compat/regex/regcomp.c: reduce scope of variables] gnulib regex is still maintained upstream and available under the LGPL 2.1+. Shouldn't we make the change there and reimport to make it easier to pull in later changes? Thanks, Jonathan -- To unsubscribe from

Re: gitignore vs. exclude vs assume-unchanged?

2014-04-16 Thread Jonathan Nieder
Hi, a...@bellandwhistle.net wrote: In particular, 'exclude' is spottily documented. Where did you expect to read about it? I see some mention of .git/info/exclude in the gitignore(5) page, but I wouldn't be surprised if there's room for improvement there (improvements welcome).

Re: Refactoring hardcoded SHA-1 constants

2014-04-18 Thread Jonathan Nieder
Hi, brian m. carlson wrote: I'd like to introduce a set of preprocessor constants that we'd use instead of hard-coded 20s and 40s everywhere. Lukewarm on that. It's hard to do consistently and unless they're named well it can be harder to know what something like BINARY_OBJECT_NAME_LENGTH

Re: [ANNOUNCE] Git v2.0.0-rc0

2014-04-22 Thread Jonathan Nieder
Kyle J. McKay wrote: The problem with --prefix= is this (from the Getopt::Long CHANGES file): Changes in version 2.37 --- * Bugfix: With gnu_compat, --foo= will no longer trigger Option requires an argument but return the empty string. The system I ran the tests

Re: [ANNOUNCE] Git v2.0.0-rc0

2014-04-22 Thread Jonathan Nieder
Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Hm, perhaps we should introduce a 'no-prefix' option to work around this. [...] That way, normal usage of --prefix would still be consistent with other git commands that prefer the form with argument attached (--prefix=foo

Re: [ANNOUNCE] Git v2.0.0-rc0

2014-04-22 Thread Jonathan Nieder
Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: The documentation says --prefix=prefix ... Before Git 2.0, the default prefix was (no prefix). This meant that ... which suggests that I can use --prefix= to mean no prefix

Re: Archiving off old branches

2014-04-23 Thread Jonathan Nieder
Hi, Tim Chase wrote: cd .git/refs mkdir -p closed mv heads/BUG-123 closed That breaks with packed refs (see git-pack-refs(1)), which are a normal thing to encounter after garbage collection. Hope that helps, Jonathan -- To unsubscribe from this list: send the line unsubscribe git in

Re: Trying to setup Visual Studio 2013 with a CentOS 6.5 x64 git server

2014-04-23 Thread Jonathan Nieder
Hi, Charles Buege wrote: If, in actuality, I can use a CentOS git server with Visual Studio 2013, can anyone point me in the direction of an FAQ/directions/YouTube video/book/anything for how to setup something like this? I suspect

Re: Harmful LESS flags

2014-04-23 Thread Jonathan Nieder
(cc-ing Mark Nudelman, less maintainer) Hi, d...@mailtor.net wrote: Consider this diff, printed by `git diff` #!/usr/bin/env python -print('foo') +print('bar') Looks ok to merge and run. But, after disabling the pager: Unfortunately there are other kinds of subtle

Re: [PATCH v5 2/9] test: add test_write_lines helper

2014-04-24 Thread Jonathan Nieder
Michael S. Tsirkin wrote: --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -712,6 +712,11 @@ test_ln_s_add () { fi } +# This function writes out its parameters, one per line +test_write_lines () { + printf %s\n $@; +} + Thanks for fixing this. Nits: * no

Re: [PATCH v5 5/9] patch-id: document new behaviour

2014-04-24 Thread Jonathan Nieder
Michael S. Tsirkin wrote: Documentation/git-patch-id.txt | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) Ah, there's the documentation. Please squash this with the patch that introduces the new behavior so they can be reviewed together more easily (both now and

Re: [PATCH v5 4/9] patch-id: make it stable against hunk reordering

2014-04-24 Thread Jonathan Nieder
Hi, Michael S. Tsirkin wrote: Patch id changes if users 1. reorder file diffs that make up a patch or 2. split a patch up to multiple diffs that touch the same path (keeping hunks within a single diff ordered to make patch valid). As the result is functionally equivalent, a different

Re: What is missing from Git v2.0

2014-04-24 Thread Jonathan Nieder
Stefan Beller wrote: I may have missunderstood. So today you cannot commit if you don't provide an email address (usually the first time you try to commit, git asks to git config --global author.email=y...@mail.here), if I remember correctly, so there is definitely a valid (i.e. user

Re: Harmful LESS flags

2014-04-24 Thread Jonathan Nieder
Hi, David Kastrup wrote: Jeff King p...@peff.net writes: There are two questions here: 1. Can less do a better job of indicating what's in the input when -S is in effect? 2. What should get put into $LESS by default? I was specifically addressing (1). Your comment does not help

Re: Harmful LESS flags

2014-04-25 Thread Jonathan Nieder
Hi, Matthieu Moy wrote: I am personally in favor of changing the default to drop the S. Silently hiding stuff from the user's eyes is really bad. With good coding standard and reasonable terminal size, it actually doesn't matter. Just for clarity: no, when we are talking about well formatted

Re: What is missing from Git v2.0

2014-04-25 Thread Jonathan Nieder
Hi, David Kastrup wrote: Javier Domingo Cansino javier...@gmail.com writes: = Reject non-fast-forward pulls by default = Not having this introduced yet allows newbie people to use git with just 4 commands, without bothering around with fetch and merge and so. If you have a gun lying around

Re: Harmful LESS flags

2014-04-25 Thread Jonathan Nieder
David Kastrup wrote: Jonathan Nieder jrnie...@gmail.com writes: Just for clarity: no, when we are talking about well formatted code, -S is actually a way better interface. When we are talking about well-formatted code, -S does not matter either which way. Sorry for the lack of clarity. I

Re: What is missing from Git v2.0

2014-04-25 Thread Jonathan Nieder
David Kastrup wrote: Jonathan Nieder jrnie...@gmail.com writes: I probably missed a subtlety, but the above comment reminded me of some netiquette I think this list is starting to forget. If I have misread it, please let me know and skip the rest of this message. [...] On the git list

Re: [PATCH 02/11] refs.c: change ref_transaction_update() to do error checking and return status

2014-04-25 Thread Jonathan Nieder
Hi, Ronnie Sahlberg wrote: Update ref_transaction_update() do some basic error checking and return true on error. Update all callers to check ref_transaction_update() for error. Micronit: nonzero, not true. (true tends to mean '1' while here we have the usual error return of -1. It's kind

Re: [PATCH v3 00/19] Use ref transactions from most callers

2014-04-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: 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. Thanks. Is this series based against mh/ref-transaction from next? [...] I think I have covered all issues raised on the

Re: [PATCH v3 03/19] refs.c: make ref_transaction_commit return an error string

2014-04-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Let ref_transaction_commit return an optional error string that describes the transaction failure. Start by returning the same error as update_ref_lock returns, modulo the initial error:/fatal: preamble. s/returns/prints/? This will make it easier for callers to

Re: [PATCH v3 04/19] refs.c: return error string from ref_update_reject_duplicates on failure

2014-04-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: --- a/refs.c +++ b/refs.c @@ -3393,6 +3393,7 @@ static int ref_update_compare(const void *r1, const void *r2) } static int ref_update_reject_duplicates(struct ref_update **updates, int n, + char **err,

Re: [PATCH v3 05/19] update-ref.c: use the error string from _commit to print better message

2014-04-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Call ref_transaction_commit with QUIET_ON_ERR and use the error string that is returned to print a better log message if/after the transaction fails. Ah, so that's how the transition to a better API happens. Makes sense. (A mention of QUIET_ON_ERR in the patch that

Re: [PATCH v3 06/19] refs.c: make update_ref_write to return error string on failure

2014-04-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Change update_ref_write to also return an error string on failure. This makes the error avaialbel to ref_transaction_commit callers if the transaction failed dur to update_ref_sha1/write_ref_sha1 failures. Nits: * available * during Probably should come right after

Re: [PATCH v3 07/19] refs.c: remove the onerr argument to ref_transaction_commit

2014-04-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Since we now pass meaningful error messages back from ref_transaction_commit on failures, we no longer need to provide a onerr argument. Yay! More precisely, now that all callers use UPDATE_REFS_QUIET_ON_ERR there's no need to support any other behavior. Thanks for

Re: [PATCH 01/12] MINGW: config.mak.uname: add explicit way to request MinGW-build

2014-04-28 Thread Jonathan Nieder
Hi, Marat Radchenko wrote: When crosscompiling, one cannot rely on `uname` from host system. Thus, add an option to use `make MINGW=1` for building MinGW build from non-MinGW host (Linux, for example). The same also applies when cross-compiling for any other platform, no? The consistent

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Jonathan Nieder
Hi, Marat Radchenko wrote: +# Define CROSS_COMPILE to specify the prefix used for all executables used +# during compilation. Only gcc and related bin-utils executables +# are prefixed with $(CROSS_COMPILE). Please include an example. # Define CROSS_COMPILE=foo- if your compiler and

Re: [PATCH 10/12] MINGW: config.mak.uname: drop USE_NED_ALLOCATOR

2014-04-28 Thread Jonathan Nieder
Erik Faye-Lund wrote: On Mon, Apr 28, 2014 at 3:51 PM, Marat Radchenko ma...@slonopotamus.org wrote: nedalloc was initially added in f0ed82 to fix slowness of standard WinXP memory allocator. Since WinXP is EOLed, this point is no longer valid. The actual reason behind this commit is

Re: [PATCH v3 1/2] Makefile: use curl-config to determine curl flags

2014-04-28 Thread Jonathan Nieder
Hi, Dave Borowitz wrote: curl-config is usually installed alongside a curl distribution, and its purpose is to provide flags for building against libcurl, so use it instead of guessing flags and dependent libraries. The previous version of these two patches is already part of master. Could

Re: Reference to a commit inside a commit message

2014-04-28 Thread Jonathan Nieder
Hi, enzodici...@gmail.com wrote: Hi to all, I'm trying to figure out what is the best way (and if it exists) to link a message of a commit to another commit. [...] Obviously I don't mean to put the raw Hash, Why not? See the output of git log --grep='In commit ' and git

Re: [PATCH] Makefile: default to -lcurl when no CURL_CONFIG or CURLDIR

2014-04-28 Thread Jonathan Nieder
Dave Borowitz wrote: On Mon, Apr 28, 2014 at 1:05 PM, Jonathan Nieder jrnie...@gmail.com wrote: Dave Borowitz wrote: +++ b/Makefile @@ -35,7 +35,9 @@ all:: # transports (neither smart nor dumb). # # Define CURL_CONFIG to the path to a curl-config binary other than the -# default 'curl

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Jonathan Nieder
Hi, Marat Radchenko wrote: On Mon, Apr 28, 2014 at 09:25:36AM -0700, Jonathan Nieder wrote: -STRIP ?= strip +STRIP = $(CROSS_COMPILE)strip Before, STRIP from the environment took precedence over STRIP from the makefile. Switching to the more usual 'environment can't be trusted

Re: [PATCH v2] Makefile: default to -lcurl when no CURL_CONFIG or CURLDIR

2014-04-28 Thread Jonathan Nieder
Dave Borowitz wrote: Signed-off-by: Dave Borowitz dborow...@google.com --- Makefile | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) For what it's worth, Reviewed-by: Jonathan Nieder jrnie...@gmail.com Thanks for the quick turnaround

Re: [PATCH 04/12] Makefile: introduce CROSS_COMPILE variable

2014-04-28 Thread Jonathan Nieder
Marat Radchenko wrote: On Mon, Apr 28, 2014 at 12:37:42PM -0500, Felipe Contreras wrote: +CC = $(CROSS_COMPILE)cc Nice. Actually, not. You still have to override CC because it is $(CROSS_COMPILE)*g*cc. Any thoughts how to handle this? One possibility would be something like ifdef

Re: Pull is Evil

2014-04-30 Thread Jonathan Nieder
Marc Branchaud wrote: All that said, I don't object to any attempts at improving the command either. But I also don't see any kind of improvement that would lead me to start using git pull let alone recommending it to new users. If git pull starts using --ff-only by default then I might

Re: Problem: staging of an alternative repository

2014-04-30 Thread Jonathan Nieder
Hi Pavel, Pasha Bolokhov wrote: It turns out Git treats the directory '.git' differently enough from everything else. That may be ok, Yeah, it's intended. [...] if you supply a different repository base name, say, '.git_new', by either setting GIT_DIR or using the '--git-dir'

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-04-30 Thread Jonathan Nieder
Hi, Nathan Collins wrote: Patches created with 'diff.noprefix=true' don't 'git apply' without specifying '-p0'. I'm not sure this is a bug -- the 'man git-apply' just says Reads the supplied diff output (i.e. a patch) and applies it to files -- but I would expect patches I create locally

Re: [PATCH] Define constants for lengths of object names

2014-05-01 Thread Jonathan Nieder
Hi, brian m. carlson wrote: --- a/object.h +++ b/object.h [...] @@ -49,7 +56,7 @@ struct object { unsigned used : 1; unsigned type : TYPE_BITS; unsigned flags : FLAG_BITS; - unsigned char sha1[20]; + unsigned char sha1[GIT_OID_RAWSZ]; Maybe my brain has been

Re: [PATCH] Define constants for lengths of object names

2014-05-01 Thread Jonathan Nieder
Jonathan Nieder wrote: brian m. carlson wrote: --- a/object.h +++ b/object.h [...] @@ -49,7 +56,7 @@ struct object { unsigned used : 1; unsigned type : TYPE_BITS; unsigned flags : FLAG_BITS; -unsigned char sha1[20]; +unsigned char sha1[GIT_OID_RAWSZ]; Maybe my

Re: git send-email doesn't work with IPv6 and STARTTLS

2014-05-01 Thread Jonathan Nieder
Hi, Steffen Ullrich wrote: git-send-mail does not use Net::SMTP directly for SSL support, but: - for direct connections (port 465) it uses Net::SMTP::SSL which just replaces the superclass if Net::SMTP with IO::Socket::SSL and thus implicitly supports IPv6 (because IO::Socket::SSL does)

Re: Zsh submodule name completion borked

2014-05-01 Thread Jonathan Nieder
Hi, Phil Hord wrote: When I use zsh tab-completion to complete the submodule name in 'git submodule init', I get more than I expected. Is this using zsh's native tab-completion (i.e., not the tab completion bundled with git)? There might have been a change there. Another place to look for

Re: [PATCH] Define constants for lengths of object names

2014-05-01 Thread Jonathan Nieder
brian m. carlson wrote: On Thu, May 01, 2014 at 10:20:07AM -0700, Jonathan Nieder wrote: What happened to the struct object_id { unsigned char id[20]; }; ... struct object { ... struct object_id id; }; idea

Re: #178 parsing of pretty=format:%an %ad causes fatal: bad revision '%ad'

2014-05-02 Thread Jonathan Nieder
Hi Dave, Dave Bradley wrote: G:\ws_test_env\GIT_TESTBED_TMP\fest-swing-1.xgit log --all --pretty=format:%an %ad -- pom.xml Mon Nov 23 03:09:17 2009 + Mon Nov 23 02:42:24 2009 + G:\ws_test_env\GIT_TESTBED_TMP\fest-swing-1.xgit log --all --pretty=format:%an %ad

Re: #178 parsing of pretty=format:%an %ad causes fatal: bad revision '%ad'

2014-05-02 Thread Jonathan Nieder
(resending with the correct address for the Git for Windows developers. Sorry for the noise.) Hi Dave, Dave Bradley wrote: G:\ws_test_env\GIT_TESTBED_TMP\fest-swing-1.xgit log --all --pretty=format:%an %ad -- pom.xml Mon Nov 23 03:09:17 2009 + Mon Nov 23 02:42:24

Re: BUG or FEATURE? Use of '/' in branch names

2014-05-02 Thread Jonathan Nieder
Hi Keith, Keith Derrick wrote: $ git checkout -b hotfix Switched to a new branch 'hotfix' $ git checkout -b hotfix/b2 error: unable to resolve reference refs/heads/hotfix/b2: Not a directory fatal: Failed to lock ref for update: Not a directory $ That's an ugly

Re: BUG or FEATURE? Use of '/' in branch names

2014-05-02 Thread Jonathan Nieder
Hi, Keith Derrick wrote: Yes, I've since found some discussion on this, and had already changed to use '-' to append the classifier. But the other problem is that I can't easily find this restriction documented anywhere - which means it comes as a suprise to people. That sounds like

Re: Pull is Mostly Evil

2014-05-02 Thread Jonathan Nieder
Hi, Philip Oakley wrote: That assumes that [git pull] doing something is better than doing nothing, which is appropriate when the costs on either side are roughly similar. I think the conversation's going around in circles. Potential next steps: a. Documentation or test patch illustrating

Re: [PATCH v2] pager: remove 'S' from $LESS by default

2014-05-05 Thread Jonathan Nieder
. For what it's worth, Reviewed-by: Jonathan Nieder jrnie...@gmail.com -- 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: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-05 Thread Jonathan Nieder
Nathan Collins wrote: On Wed, Apr 30, 2014 at 7:40 PM, Jonathan Nieder jrnie...@gmail.com wrote: Nathan Collins wrote: git show | git apply --reverse The following which only uses plumbing commands should work: git diff-tree -p HEAD^! | git apply --reverse Nice! However

Re: [PATCH 1/2] merge-recursive.c: Fix case-changing merge.

2014-05-07 Thread Jonathan Nieder
Junio C Hamano wrote: dtur...@twopensource.com writes: +test -e testcase Please make it a habit to use test -f when you expect the path exists as a file, not merely something exists there I do not care if it is a file or a directory, for which test -e is perfectly appropriate. Or,

[PATCH] shell doc: remove stray + in example

2014-05-07 Thread Jonathan Nieder
it. A quick search with grep -e 'p+' /usr/share/doc/git/html/*.html doesn't find any other instances of this problem. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- Documentation/git-shell.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-shell.txt b

Submodule improvements (Re: What's cooking in git.git (Apr 2014, #09; Tue, 29))

2014-05-08 Thread Jonathan Nieder
Hi, David Lang wrote: I haven't been paying close attention for a while, what would have to be done to make submodules an integral part of Git? The series at http://thread.gmane.org/gmane.comp.version-control.git/241455 is a start. I'm hoping to get a reroll done soon and then I can talk

Re: Conforming to pep8

2014-05-08 Thread Jonathan Nieder
(cc-ing Pete Wyckoff who maintains git-p4 and Michael Haggerty who maintains git-multimail) Hi, William Giokas wrote: - We follow PEP-8 (http://www.python.org/dev/peps/pep-0008/). It's even the first thing that you see when you go looking for 'python' in the coding style document. I

Re: [PATCH v1 12/25] contrib: remove 'vim'

2014-05-08 Thread Jonathan Nieder
-by: Jonathan Nieder jrnie...@gmail.com --- contrib/vim/README | 22 -- 1 file changed, 22 deletions(-) delete mode 100644 contrib/vim/README diff --git a/contrib/vim/README b/contrib/vim/README deleted file mode 100644 index 8f16d06..000 --- a/contrib/vim/README +++ /dev/null

Re: [PATCH] svn-fe: Conform to pep8

2014-05-08 Thread Jonathan Nieder
Hi, William Giokas wrote: Quite a large change, most of this was whitespace changes, though there were a few places where I removed a comma or added a few characters. Should pass through pep8 and pass every test. Thanks! Mind if I forge your sign-off? (See Documentation/SubmittingPatches

Re: [PATCH v1 04/25] contrib: remove 'buildsystems'

2014-05-09 Thread Jonathan Nieder
Hi, Erik Faye-Lund wrote: On Fri, May 9, 2014 at 10:14 AM, Felipe Contreras felipe.contre...@gmail.com wrote: Erik Faye-Lund wrote: Please don't. This script is useful to build with the MSVC IDE, which enables us to use their excellent debugger. If you want this script to remain in

Re: [PATCH v1 06/25] contrib: remove 'diffall'

2014-05-09 Thread Jonathan Nieder
Hi Tim, Tim Henigan wrote: On Thu, May 8, 2014 at 5:58 PM, Felipe Contreras felipe.contre...@gmail.com wrote: contrib/diffall/README | 31 -- contrib/diffall/git-diffall | 257 2 files changed, 288 deletions(-) delete mode 100644

Re: [PATCH v1 06/25] contrib: remove 'diffall'

2014-05-09 Thread Jonathan Nieder
for people choosing a tool to use by removing the old diffall script. A pointer in the release notes should be enough to help current users migrate. Helped-by: Tim Henigan tim.heni...@gmail.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- contrib/diffall/README | 31 -- contrib

Re: [PATCH 1/2] inline constant return from error() function

2014-05-12 Thread Jonathan Nieder
Hi, Jeff King wrote: On Mon, May 05, 2014 at 05:29:38PM -0400, Jeff King wrote: I cannot think of any other way to make the compiler aware of the constant value, but perhaps somebody else is more clever than I am. This came to me in a dream, and seems to work. Clever. :) Thanks for

Re: [PATCH] git format-patch --signature string | file

2014-05-13 Thread Jonathan Nieder
Hi, Jeremiah Mahler wrote: # from a string $ git format-patch --signature from a string origin # or from a file $ git format-patch --signature ~/.signature origin Interesting. But... what if I want my patch to end with -- /home/jrnieder/.signature ? It seems

Re: [PATCH v6 00/42] Use ref transactions for all ref updates

2014-05-13 Thread Jonathan Nieder
Hi, Ronnie Sahlberg wrote: This patch series is based on next and expands on the transaction API. Sorry to take so long to get to this. For the future, it's easier to review patches based on some particular branch that got merged into next, since next is a moving target (series come and go

Re: [PATCH v6 02/42] refs.c: allow passing NULL to ref_transaction_free

2014-05-13 Thread Jonathan Nieder
, Reviewed-by: Jonathan Nieder jrnie...@gmail.com -- 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 v6 03/42] refs.c: add a strbuf argument to ref_transaction_commit for error logging

2014-05-13 Thread Jonathan Nieder
-NULL we will add an error string to it to explain why + * the transaction failed. Probably worth mentioning the error string doesn't end with a newline so the caller knows how to use it. With the whitespace fix and with or without the comment tweak, Reviewed-by: Jonathan Nieder jrnie...@gmail.com

Re: [PATCH v6 04/42] refs.c: make ref_update_reject_duplicates take a strbuf argument for errors

2014-05-13 Thread Jonathan Nieder
updates for the same ref. Reviewed-by: Jonathan Nieder jrnie...@gmail.com -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-14 Thread Jonathan Nieder
Hi, Junio C Hamano wrote: Stepan Kasal ka...@ucw.cz writes: --- a/builtin/grep.c +++ b/builtin/grep.c @@ -897,6 +897,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix) if (len 4 is_dir_sep(pager[len - 5])) pager += len - 4; +

Re: [PATCH v6 05/42] update-ref.c: log transaction error from the update_ref

2014-05-14 Thread Jonathan Nieder
Hi, Ronnie Sahlberg wrote: --- a/builtin/update-ref.c +++ b/builtin/update-ref.c @@ -342,6 +342,7 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix) [...] @@ -359,17 +360,16 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix) [...] if

Re: [PATCH v6 06/42] refs.c: make update_ref_write update a strbuf on failure

2014-05-14 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Change update_ref_write to also update an error strbuf on failure. This makes the error available to ref_transaction_commit callers if the transaction failed due to update_ref_sha1/write_ref_sha1 failures. Reviewed-by: Jonathan Nieder jrnie...@gmail.com

Re: [PATCH v6 07/42] refs.c: remove the onerr argument to ref_transaction_commit

2014-05-14 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Since all callers now use QUIET_ON_ERR we no longer need to provide an onerr argument any more. Remove the onerr argument from the ref_transaction_commit signature. Nice, and obviously correct. Reviewed-by: Jonathan Nieder jrnie...@gmail.com -- To unsubscribe from

Re: [PATCH v6 08/42] refs.c: change ref_transaction_update() to do error checking and return status

2014-05-14 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Update ref_transaction_update() do some basic error checking and return true on error. Update all callers to check ref_transaction_update() for error. There are currently no conditions in _update that will return error but there will be in the future. Signed-off-by:

Re: [PATCH v6 09/42] refs.c: change ref_transaction_create to do error checking and return status

2014-05-14 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Do basic error checking in ref_transaction_create() and make it return status. Update all callers to check the result of ref_transaction_create() There are currently no conditions in _create that will return error but there will be in the future. Same concerns as with

Re: [PATCH v6 10/42] refs.c: ref_transaction_delete to check for error and return status

2014-05-14 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Change ref_transaction_delete() to do basic error checking and return status. Update all callers to check the return for ref_transaction_delete() There are currently no conditions in _delete that will return error but there will be in the future. Signed-off-by: Ronnie

Re: [PATCH v6 11/42] tag.c: use ref transactions when doing updates

2014-05-14 Thread Jonathan Nieder
Ronnie Sahlberg wrote: --- a/builtin/tag.c +++ b/builtin/tag.c @@ -701,11 +702,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix) if (annotate) create_tag(object, tag, buf, opt, prev, object); - lock = lock_any_ref_for_update(ref.buf, prev, 0,

Re: [PATCH v6 12/42] replace.c: use the ref transaction functions for updates

2014-05-14 Thread Jonathan Nieder
Ronnie Sahlberg wrote: [...] +++ b/builtin/replace.c [...] @@ -157,11 +158,12 @@ static int replace_object(const char *object_ref, const char *replace_ref, else if (!force) die(replace ref '%s' already exists, ref); - lock = lock_any_ref_for_update(ref, prev, 0,

Re: [PATCH v6 13/42] commit.c: use ref transactions for updates

2014-05-14 Thread Jonathan Nieder
Ronnie Sahlberg wrote: [...] +++ b/builtin/commit.c @@ -1541,11 +1541,12 @@ int cmd_commit(int argc, const char **argv, const char *prefix) [...] @@ -1667,16 +1668,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix) strbuf_release(author_ident);

Re: [PATCH 10/10] git-submodule.sh: don't use the -a or -b option with the test command

2014-05-15 Thread Jonathan Nieder
Elia Pinto wrote: Even though POSIX.1 lists -a/-o as options to test, they are marked Obsolescent XSI. Scripts using these expressions should be converted as follow: [... many lines snipped ...] This is a very long description, and it doesn't leave me excited by the change. Is there some

Re: [PATCH v6 11/42] tag.c: use ref transactions when doing updates

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Instead of the suggestions above, would you accept an alternative approach where I would add an err argument to ref_transaction_begin() instead? For a hypothetical mysql backend, this could then do something like : [...] fatal: refs/heads/master: cannot update the

Re: [PATCH v6 09/42] refs.c: change ref_transaction_create to do error checking and return status

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: On Wed, May 14, 2014 at 5:04 PM, Jonathan Nieder jrnie...@gmail.com wrote: If it were ever triggered, the message error: some bad thing fatal: failed transaction create for refs/heads/master looks overly verbose and unclear. Something like

Re: [PATCH v6 14/42] sequencer.c: use ref transactions for all ref updates

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: --- a/sequencer.c +++ b/sequencer.c @@ -272,23 +272,31 @@ static int error_dirty_index(struct replay_opts *opts) static int fast_forward_to(const unsigned char *to, const unsigned char *from, int unborn, struct replay_opts *opts) { -

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-15 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: On Wed, 14 May 2014, Junio C Hamano wrote: Spot on. The change, especially with -I, makes sense. Except that it was not tested with -I. If you change it that way and it stops working on Windows, it's useless to me. Are you saying that less on Windows doesn't

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-15 Thread Jonathan Nieder
Johannes Schindelin wrote: On Wed, 14 May 2014, Jeff King wrote: We've already found the lines of interest to the user. It would be nice if we could somehow point the pager at them by number, rather than repeating the (slightly incompatible) search. FWIW it is exactly that type of I want

Re: [PATCH v8 00/44] Use ref transactions for all ref updates

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: This patch series is based on next and expands on the transaction API. Thanks. Will pick up in v8 where I left off with v6. Applies with just one minor conflict on top of a merge of mh/ref-transaction, rs/ref-update-check-errors-early, and rs/reflog-exists. Here's an

Re: [PATCH v8 01/44] refs.c: constify the sha arguments for ref_transaction_create|delete|update

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: 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*. Obviously good. Reviewed-by: Jonathan Nieder jrnie...@gmail.com -- To unsubscribe from this list: send the line

Re: [PATCH v8 02/44] refs.c: allow passing NULL to ref_transaction_free

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Allow ref_transaction_free to be called with NULL and as a result allow ref_transaction_rollback to be called for a NULL transaction. This allows us to write code that will if ( (!transaction || ref_transaction_update(...)) ||

Re: [PATCH v8 04/44] refs.c: add an err argument to repack_without_refs

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: --- a/refs.c +++ b/refs.c @@ -2427,12 +2427,12 @@ static int curate_packed_ref_fn(struct ref_entry *entry, void *cb_data) return 0; } -static int repack_without_refs(const char **refnames, int n) +static int repack_without_refs(const char **refnames, int

Re: [PATCH v8 06/44] refs.c: add an err argument ro delete_loose_ref

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: [Subject: refs.c: add an err argument ro delete_loose_ref] s/ro/to/ s/delete_loose_ref/delete_ref_loose/ --- a/refs.c +++ b/refs.c @@ -2484,17 +2484,22 @@ static int repack_without_ref(const char *refname) return repack_without_refs(refname, 1, NULL); }

Re: [PATCH v8 08/44] update-ref.c: log transaction error from the update_ref

2014-05-15 Thread Jonathan Nieder
be to add the missing error message when commiting packed-refs fails (thanks for fixing that) and to change some one-line errors to two-line. Reviewed-by: Jonathan Nieder jrnie...@gmail.com -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord

Re: [PATCH v8 10/44] refs.c: change ref_transaction_update() to do error checking and return status

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Update ref_transaction_update() do some basic error checking and return non-zero on error. Update all callers to check ref_transaction_update() for error. There are currently no conditions in _update that will return error but there will be in the future. Probably

Re: [PATCH v8 11/44] refs.c: change ref_transaction_create to do error checking and return status

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Do basic error checking in ref_transaction_create() and make it return non-zero on error. Same thoughts as _update(). Basic idea is good but would be nice to have a 'struct strbuf *err' parameter. Thanks, Jonathan -- To unsubscribe from this list: send the line

Re: [PATCH v8 12/44] refs.c: ref_transaction_delete to check for error and return status

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Change ref_transaction_delete() to do basic error checking and return non-zero of error. Likewise: a 'struct strbuf *err' would make nicer error messages possible. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: [PATCH v8 13/44] tag.c: use ref transactions when doing updates

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: --- a/builtin/tag.c +++ b/builtin/tag.c @@ -701,11 +702,12 @@ int cmd_tag(int argc, const char **argv, const char *prefix) if (annotate) create_tag(object, tag, buf, opt, prev, object); - lock = lock_any_ref_for_update(ref.buf, prev, 0,

Re: [PATCH v8 14/44] replace.c: use the ref transaction functions for updates

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: --- a/builtin/replace.c +++ b/builtin/replace.c [...] @@ -156,11 +157,12 @@ static int replace_object_sha1(const char *object_ref, else if (!force) die(replace ref '%s' already exists, ref); - lock = lock_any_ref_for_update(ref, prev, 0,

<    1   2   3   4   5   6   7   8   9   10   >