[PATCH v2 2/2] mingw: avoid const warning

2014-06-06 Thread Stepan Kasal
Fix const warnings in http-fetch.c and remote-curl.c main() where is argv declared as const. The fix should work for all future declarations of main, no matter whether the second parameter's type is "char**", "const char**", or "char *[]". Signed-off-by: Stepan Kasal --- compat/mingw.h | 2 +-

[PATCH v2 1/2] Win32: move main macro to a function

2014-06-06 Thread Stepan Kasal
From: Karsten Blees Date: Fri, 7 Jan 2011 19:47:23 +0100 The code in the MinGW main macro is getting more and more complex, move to a separate initialization function for readabiliy and extensibility. Signed-off-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal ---

[PATCH v2 0/2] mingw: macro main(), const warnings

2014-06-06 Thread Stepan Kasal
Hi, On Fri, Jun 06, 2014 at 11:15:04PM +0200, Karsten Blees wrote: > Am 06.06.2014 21:13, schrieb Junio C Hamano: > > I am wondering why the solution is not a more obvious "drop const > > that is not ANSI C", though. I only have a ready-access to N1570 > > draft but in it I find: > > > > Actually

[PATCH v4 1/4] replace: add --graft option

2014-06-06 Thread Christian Couder
The usage string for this option is: git replace [-f] --graft [...] First we create a new commit that is the same as except that its parents are [...] Then we create a replace ref that replace with the commit we just created. With this new option, it should be straightforward to convert graf

[PATCH v4 3/4] Documentation: replace: add --graft option

2014-06-06 Thread Christian Couder
Signed-off-by: Christian Couder --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644 --- a/Documentation/git-replace.txt +++ b/Documentation/git-replace.txt @@ -10,

[PATCH v4 0/4] Add --graft option to git replace

2014-06-06 Thread Christian Couder
Here is a small patch series to implement: git replace [-f] --graft [...] This patch series goes on top of the patch series that implements --edit. The changes since v3, thanks to Junio, are: - remove function read_sha1_commit() and its call as well as a call to parse_commit_buffer()

[PATCH v4 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-06 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of "git replace". While at it let's mention this new script in the "git replace" documentation for the --graft option. Signed-off-by: Christian Couder ---

[PATCH v4 2/4] replace: add test for --graft

2014-06-06 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t6050-replace.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..ca45a84 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -351,4 +351,16 @@ test_expect_success 'replace ref cl

sort entries numerically

2014-06-06 Thread Toralf Förster
Hi, is there any chance to have "1.8" before "1.10" in an output like the following : ... >From https://code.wireshark.org/review/wireshark 52fe0aa..b69642d master -> origin/master 460db8a..540f061 master-1.10 -> origin/master-1.10 25bb29a..5741a40 master-1.12 -> origin/master-1.

Re: Reset by checkout?

2014-06-06 Thread Atsushi Nakagawa
Atsushi Nakagawa wrote: > Kevin Bracey wrote: > > On 31/05/2014 08:46, Atsushi Nakagawa wrote: > > >`git checkout -B ` > > > > > > This is such an useful notion that I can fathom why there isn't a better, > > > first-tier, alternative.q > > ... > > > > I guess in theory using "checkout" all

Re: Reset by checkout?

2014-06-06 Thread Atsushi Nakagawa
Kevin Bracey wrote: > On 01/06/2014 07:26, Atsushi Nakagawa wrote: > > Kevin Bracey wrote: > >> The original "git reset --hard" used to be a pretty top-level command. > >> It was used for aborting merges in particular. But I think it now > >> stands out as being one of the only really dangerous p

GOOD DAY,

2014-06-06 Thread YAO YUTA
My name is Mr Yao Yuta from Hong Kong, I want you to be my partner in a business project. If Interested Contact me back via my email address. Thank you, Mr. Yao Yuta. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More ma

We offer all purpose loan at 3% interest rate

2014-06-06 Thread Santander Finance
We offer all purpose loan at 3% interest rate. Contact Us for more details by Email:santanderfinancegr...@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.

What's cooking in git.git (Jun 2014, #02; Fri, 6)

2014-06-06 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'. The second batch of topics, all of which have been cooking for quite a while on the 'next' branch, have been merged to 'master'. I am aware of

[PATCH v14 04/40] refs.c: allow passing NULL to ref_transaction_free

2014-06-06 Thread Ronnie Sahlberg
Allow ref_transaction_free(NULL) as a no-op. This makes ref_transaction_free easier to use and more similar to plain 'free'. In particular, it lets us rollback unconditionally as part of cleanup code after setting 'transaction = NULL' if a transaction has been committed or rolled back already. Re

[PATCH] revision: parse "git log -" more carefully

2014-06-06 Thread Junio C Hamano
This mistyped command line simply ignores "master" and ends up showing two commits from the current HEAD: $ git log -2master because we feed "2master" to atoi() without making sure that the whole string is parsed as an integer. Use the strtol_i() helper function instead. Signed-off-by: Juni

[PATCH v14 28/40] refs.c: remove the update_ref_lock function

2014-06-06 Thread Ronnie Sahlberg
Since we now only call update_ref_lock with onerr==QUIET_ON_ERR we no longer need this function and can replace it with just calling lock_any_ref_for_update directly. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- refs.c | 30 ++ 1 file changed, 6 in

[PATCH v14 07/40] refs.c: make ref_update_reject_duplicates take a strbuf argument for errors

2014-06-06 Thread Ronnie Sahlberg
Make ref_update_reject_duplicates return any error that occurs through a new strbuf argument. This means that when a transaction commit fails in this function we will now be able to pass a helpful error message back to the caller. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg ---

[PATCH v14 08/40] refs.c: add an err argument to delete_ref_loose

2014-06-06 Thread Ronnie Sahlberg
Add an err argument to delete_loose_ref so that we can pass a descriptive error string back to the caller. Pass the err argument from transaction commit to this function so that transaction users will have a nice error string if the transaction failed due to delete_loose_ref. Add a new function un

[PATCH v14 29/40] refs.c: remove the update_ref_write function

2014-06-06 Thread Ronnie Sahlberg
Since we only call update_ref_write from a single place and we only call it with onerr==QUIET_ON_ERR we can just as well get rid of it and just call write_ref_sha1 directly. This changes the return status for _commit from 1 to -1 on failures when writing to the ref. Eventually we will want _commit

[PATCH v14 19/40] commit.c: use ref transactions for updates

2014-06-06 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. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- builtin/commit.c | 24 +++- 1 file changed, 11 insertions(+), 13 dele

[PATCH v14 22/40] branch.c: use ref transaction for all ref updates

2014-06-06 Thread Ronnie Sahlberg
Change create_branch to use a ref transaction when creating the new branch. This also fixes a race condition in the old code where two concurrent create_branch could race since the lock_any_ref_for_update/write_ref_sha1 did not protect against the ref already existing. I.e. one thread could end up

[PATCH v14 00/40] Use ref transactions

2014-06-06 Thread Ronnie Sahlberg
This patch series can also be found at https://github.com/rsahlberg/git/tree/ref-transactions This patch series is based on next and expands on the transaction API. It converts all ref updates, inside refs.c as well as external, to use the transaction API for updates. This makes most of the ref u

[PATCH v14 05/40] refs.c: add a strbuf argument to ref_transaction_commit for error logging

2014-06-06 Thread Ronnie Sahlberg
Add a strbuf argument to _commit so that we can pass an error string back to the caller. So that we can do error logging from the caller instead of from _commit. Longer term plan is to first convert all callers to use onerr==QUIET_ON_ERR and craft any log messages from the callers themselves and f

[PATCH v14 06/40] refs.c: add an err argument to repack_without_refs

2014-06-06 Thread Ronnie Sahlberg
Update repack_without_refs to take an err argument and update it if there is a failure. Pass the err variable from ref_transaction_commit to this function so that callers can print a meaningful error message if _commit fails due to a problem in repack_without_refs. Add a new function unable_to_loc

[PATCH v14 01/40] refs.c: remove ref_transaction_rollback

2014-06-06 Thread Ronnie Sahlberg
We do not yet need both a rollback and a free function for transactions. Remove ref_transaction_rollback and use ref_transaction_free instead. At a later stage we may reintroduce a rollback function if we want to start adding reusable transactions and similar. Reviewed-by: Jonathan Nieder Signed

[PATCH v14 11/40] refs.c: remove the onerr argument to ref_transaction_commit

2014-06-06 Thread Ronnie Sahlberg
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. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- builtin/update-ref.c | 3 +-- refs.c | 22 +++--

[PATCH v14 27/40] refs.c: make lock_ref_sha1 static

2014-06-06 Thread Ronnie Sahlberg
No external callers reference lock_ref_sha1 any more so lets declare it static. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- refs.c | 2 +- refs.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 6d2caf7..d2fd419 100644 --- a/refs.c

[PATCH v14 23/40] refs.c: change update_ref to use a transaction

2014-06-06 Thread Ronnie Sahlberg
Change the update_ref helper function to use a ref transaction internally. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- refs.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index dd98202..6d2caf7 100644 --- a/re

[PATCH v14 30/40] refs.c: remove lock_ref_sha1

2014-06-06 Thread Ronnie Sahlberg
lock_ref_sha1 was only called from one place in refc.c and only provided a check that the refname was sane before adding back the initial "refs/" part of the ref path name, the initial "refs/" that this caller had already stripped off before calling lock_ref_sha1. Reviewed-by: Jonathan Nieder Sig

[PATCH v14 31/40] refs.c: make prune_ref use a transaction to delete the ref

2014-06-06 Thread Ronnie Sahlberg
Change prune_ref to delete the ref using a ref transaction. To do this we also need to add a new flag REF_ISPRUNING that will tell the transaction that we do not want to delete this ref from the packed refs. This flag is private to refs.c and not exposed to external callers. Signed-off-by: Ronnie

[PATCH v14 26/40] walker.c: use ref transaction for ref updates

2014-06-06 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. Note that this function

[PATCH v14 10/40] update-ref: use err argument to get error from ref_transaction_commit

2014-06-06 Thread Ronnie Sahlberg
Call ref_transaction_commit with QUIET_ON_ERR and use the strbuf that is returned to print a log message if/after the transaction fails. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- builtin/update-ref.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --

[PATCH v14 21/40] fast-import.c: change update_branch to use ref transactions

2014-06-06 Thread Ronnie Sahlberg
Change update_branch() to use ref transactions for updates. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- fast-import.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/fast-import.c b/fast-import.c index 6707a66..4a7b196 100644 -

[PATCH v14 16/40] refs.c: add transaction.status and track OPEN/CLOSED/ERROR

2014-06-06 Thread Ronnie Sahlberg
Track the status of a transaction in a new status field. Check the field for sanity, i.e. that status must be OPEN when _commit/_create/_delete or _update is called or else die(BUG:...) Signed-off-by: Ronnie Sahlberg --- refs.c | 40 +++- 1 file changed, 39 in

[PATCH v14 39/40] fetch.c: change s_update_ref to use a ref transaction

2014-06-06 Thread Ronnie Sahlberg
Change s_update_ref to use a ref transaction for the ref update. Signed-off-by: Ronnie Sahlberg --- builtin/fetch.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index faa1233..52f1ebc 100644 --- a/builti

[PATCH v14 38/40] refs.c: propagate any errno==ENOTDIR from _commit back to the callers

2014-06-06 Thread Ronnie Sahlberg
In _commit, ENOTDIR can happen in the call to lock_ref_sha1_basic, either when we lstat the new refname and it returns ENOTDIR or if the name checking function reports that the same type of conflict happened. In both cases it means that we can not create the new ref due to a name conflict. For the

[PATCH v14 35/40] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-06-06 Thread Ronnie Sahlberg
Move the check for check_refname_format from lock_any_ref_for_update to lock_ref_sha1_basic. At some later stage we will get rid of lock_any_ref_for_update completely. If lock_ref_sha1_basic fails the check_refname_format test, set errno to EINVAL before returning NULL. This to guarantee that we w

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

2014-06-06 Thread Ronnie Sahlberg
Do basic error checking in ref_transaction_create() and make it return non-zero on error. 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. Add an err argument that will be updated

[PATCH v14 34/40] refs.c: pass NULL as *flags to read_ref_full

2014-06-06 Thread Ronnie Sahlberg
We call read_ref_full with a pointer to flags from rename_ref but since we never actually use the returned flags we can just pass NULL here instead. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs.c

[PATCH v14 12/40] refs.c: change ref_transaction_update() to do error checking and return status

2014-06-06 Thread Ronnie Sahlberg
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. Add an err argument that will be updated on

[PATCH v14 14/40] refs.c: update ref_transaction_delete to check for error and return status

2014-06-06 Thread Ronnie Sahlberg
Change ref_transaction_delete() to do basic error checking and return non-zero of error. 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. Add an err argument that will be updated

[PATCH v14 33/40] refs.c: pass the ref log message to _create/delete/update instead of _commit

2014-06-06 Thread Ronnie Sahlberg
Change the reference transactions so that we pass the reflog message through to the create/delete/update function instead of the commit message. This allows for individual messages for each change in a multi ref transaction. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- branch

[PATCH v14 18/40] replace.c: use the ref transaction functions for updates

2014-06-06 Thread Ronnie Sahlberg
Update replace.c to use ref transactions for updates. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- builtin/replace.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c index 4b3705d..cf92e5d 100644 --- a/b

[PATCH v14 20/40] sequencer.c: use ref transactions for all ref updates

2014-06-06 Thread Ronnie Sahlberg
Change to use ref transactions for all updates to refs. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- sequencer.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/sequencer.c b/sequencer.c index 0a80c58..fd8acaf 100644 --- a/sequenc

[PATCH v14 17/40] tag.c: use ref transactions when doing updates

2014-06-06 Thread Ronnie Sahlberg
Change tag.c to use ref transactions for all ref updates. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- builtin/tag.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index c6e8a71..c9bfc9a 100644 --- a/builtin/t

[PATCH v14 09/40] refs.c: make update_ref_write update a strbuf on failure

2014-06-06 Thread Ronnie Sahlberg
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 Signed-off-by: Ronnie Sahlberg --- refs.c | 9 ++--- 1 f

[PATCH v14 15/40] refs.c: make ref_transaction_begin take an err argument

2014-06-06 Thread Ronnie Sahlberg
Add an err argument to _begin so that on non-fatal failures in future ref backends we can report a nice error back to the caller. While _begin can currently never fail for other reasons than OOM, in which case we die() anyway, we may add other types of backends in the future. For example, a hypothe

[PATCH v14 32/40] refs.c: make delete_ref use a transaction

2014-06-06 Thread Ronnie Sahlberg
Change delete_ref to use a ref transaction for the deletion. At the same time since we no longer have any callers of repack_without_ref we can now delete this function. Change delete_ref to return 0 on success and 1 on failure instead of the previous 0 on success either 1 or -1 on failure. Review

[PATCH v14 36/40] refs.c: call lock_ref_sha1_basic directly from commit

2014-06-06 Thread Ronnie Sahlberg
Skip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic directly from the commit function. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- refs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/refs.c b/refs.c index 7da5357..6

[PATCH v14 25/40] fast-import.c: use a ref transaction when dumping tags

2014-06-06 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- fast-import.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/fast-import.c b/fast-import.c index 4a7b196..587ef4a 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1735,15 +1735,32 @@ static void dump_tags(voi

[PATCH v14 40/40] refs.c: make write_ref_sha1 static

2014-06-06 Thread Ronnie Sahlberg
No external users call write_ref_sha1 any more so lets declare it static. Signed-off-by: Ronnie Sahlberg --- refs.c | 6 +- refs.h | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 9a3a501..c9d2a89 100644 --- a/refs.c +++ b/refs.c @@ -2634,6 +2634,

[PATCH v14 24/40] receive-pack.c: use a reference transaction for updating the refs

2014-06-06 Thread Ronnie Sahlberg
Wrap all the ref updates inside a transaction. Signed-off-by: Ronnie Sahlberg --- builtin/receive-pack.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index c323081..13f4a63 100644 --- a/builti

[PATCH v14 37/40] refs.c: pass a skip list to name_conflict_fn

2014-06-06 Thread Ronnie Sahlberg
Allow passing a list of refs to skip checking to name_conflict_fn. There are some conditions where we want to allow a temporary conflict and skip checking those refs. For example if we have a transaction that 1, guarantees that m is a packed refs and there is no loose ref for m 2, the transaction w

[PATCH v14 03/40] refs.c: constify the sha arguments for ref_transaction_create|delete|update

2014-06-06 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 ref

[PATCH v14 02/40] refs.c: ref_transaction_commit should not free the transaction

2014-06-06 Thread Ronnie Sahlberg
Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- builtin/update-ref.c | 1 + refs.c | 1 - refs.h | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/builtin/update-ref.c b/builtin/update-ref.c index 405267f..1fd7a89 100644 --- a/b

Re: [PATCH 5/5] Win32: Thread-safe windows console output

2014-06-06 Thread Karsten Blees
Am 06.06.2014 23:29, schrieb Peter Krefting: > Stepan Kasal: > >> +/* only called from console_thread, so a static buffer will do */ >> +static wchar_t wbuf[2 * BUFFER_SIZE + 1]; > > Wouldn't BUFFER_SIZE + 1 (or even BUFFER_SIZE) do here? If you convert from > up to BUFFER_SIZE octets of

Re: [PATCH 5/5] Win32: Thread-safe windows console output

2014-06-06 Thread Peter Krefting
Stepan Kasal: + /* only called from console_thread, so a static buffer will do */ + static wchar_t wbuf[2 * BUFFER_SIZE + 1]; Wouldn't BUFFER_SIZE + 1 (or even BUFFER_SIZE) do here? If you convert from up to BUFFER_SIZE octets of UTF-8 input, you should never get back more than B

Re: [PATCH 3/5] Warn if the Windows console font doesn't support Unicode

2014-06-06 Thread Peter Krefting
Stepan Kasal: + warning("Your console font probably doesn\'t support Unicode. If " + "you experience strange characters in the output, consider " + "switching to a TrueType font such as Lucida Console!"); As you mention this is an old patch series, but I would

Re: [PATCH 2/2] mingw: avoid const warning

2014-06-06 Thread Karsten Blees
Am 06.06.2014 21:13, schrieb Junio C Hamano: > Karsten Blees writes: > >> Am 29.05.2014 12:47, schrieb Stepan Kasal: >>> Fix const warnings in http-fetch.c and remote-curl.c main() where is >>> argv declared as const. >>> >>> The fix should work for all future declarations of main, no matter >>>

[PATCH] git-gui: show staged submodules regardless of ignore config

2014-06-06 Thread Junio C Hamano
From: Jens Lehmann Date: Tue, 8 Apr 2014 21:30:51 +0200 Currently setting submodule..ignore and/or diff.ignoreSubmodules to "all" suppresses all output of submodule changes for git-gui. This is really confusing, as even when the user chooses to record a new commit for an ignored submodule by addi

[PATCH] gitk: show staged submodules regardless of ignore config

2014-06-06 Thread Junio C Hamano
From: Jens Lehmann Date: Tue, 8 Apr 2014 21:36:08 +0200 Currently setting submodule..ignore and/or diff.ignoreSubmodules to "all" suppresses all output of submodule changes for gitk. This is really confusing, as even when the user chooses to record a new commit for an ignored submodule by adding

Re: [msysGit] Re: [PATCH 0/5] First part of Unicode console support for msysgit

2014-06-06 Thread Stepan Kasal
Hello, On Fri, Jun 06, 2014 at 07:44:33PM +0200, Karsten Blees wrote: > > Karsten Blees (5): > > Support Unicode console output on Windows > > [..] you could have squashed half of > "Win32: fix segfault in WriteConsoleW when debugging in gdb" [2] (second > half in [5/5]). > > > Detect cons

[PATCH 5/5] Win32 dirent: improve dirent implementation

2014-06-06 Thread Stepan Kasal
From: Karsten Blees Date: Fri, 7 Jan 2011 17:57:02 +0100 Improve the dirent implementation by removing the relics that were once necessary to plug into the now unused MinGW runtime, in preparation for Unicode file name support. Move FindFirstFile to opendir, and FindClose to closedir, with the f

[PATCH 1/5] Win32 dirent: remove unused dirent.d_ino member

2014-06-06 Thread Stepan Kasal
From: Karsten Blees Date: Fri, 7 Jan 2011 17:34:33 +0100 There are no proper inodes on Windows, so remove dirent.d_ino and #define NO_D_INO_IN_DIRENT in the Makefile (this skips e.g. an ineffective qsort in fsck.c). Signed-off-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed-off-by: Step

[PATCH 4/5] Win32 dirent: clarify #include directives

2014-06-06 Thread Stepan Kasal
From: Karsten Blees Date: Fri, 7 Jan 2011 17:47:41 +0100 Git-compat-util.h is two dirs up, and already includes (which is the same as "dirent.h" due to -Icompat/win32 in the Makefile). Signed-off-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal --- compat/win32/di

[PATCH 2/5] Win32 dirent: remove unused dirent.d_reclen member

2014-06-06 Thread Stepan Kasal
From: Karsten Blees Date: Fri, 7 Jan 2011 17:38:25 +0100 Remove the union around dirent.d_type and the unused dirent.d_reclen member (which was necessary for compatibility with the MinGW dirent runtime, which is no longer used). Signed-off-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed

[PATCH 0/5] Windows dirent patches

2014-06-06 Thread Stepan Kasal
On Fri, Jun 06, 2014 at 06:33:27PM +0200, Karsten Blees wrote: > The dates are actually missing from the patches, [...] oops, this was first time I tried to use git-send-email. I hope this time it'll work better. Stepan Hello, This is a series of dirent modifications, 4 tiny ones and one bigger.

[PATCH 3/5] Win32 dirent: change FILENAME_MAX to MAX_PATH

2014-06-06 Thread Stepan Kasal
From: Karsten Blees Date: Fri, 7 Jan 2011 17:43:14 +0100 FILENAME_MAX and MAX_PATH are both 260 on Windows, however, MAX_PATH is used throughout the other Win32 code in Git, and also defines the length of file name buffers in the Win32 API (e.g. WIN32_FIND_DATA.cFileName, from which we're copying

Re: [PATCH] Add a Windows-specific fallback to getenv("HOME");

2014-06-06 Thread Sebastian Schuberth
On 04.06.2014 18:16, Stepan Kasal wrote: >> plan is to switch to mingwGitDevEnv for said release. No more msysGit. >> Like, bu-bye. Thanks for all the fish. > > Interesting. > > With msysgit, there is the "net installer" - first time I installed > msys/mingw sucessfully, it was as easy as Cygwin

Re: [PATCH 2/2] mingw: avoid const warning

2014-06-06 Thread Junio C Hamano
Karsten Blees writes: > Am 29.05.2014 12:47, schrieb Stepan Kasal: >> Fix const warnings in http-fetch.c and remote-curl.c main() where is >> argv declared as const. >> >> The fix should work for all future declarations of main, no matter >> whether the second parameter's type is "char**", "cons

Re: [PATCH 20/20] CodingGuidelines: avoid "test -a/-o "

2014-06-06 Thread Torsten Bögershausen
On 2014-06-06 16.56, Elia Pinto wrote: > + - We do not write our "test" command with "-a" and "-o" and use "&&" That "and" "and" "and" could be somewhat confusing. How about: We do not write our "test" command with "-a" and/or "-o". Instead we use "&&" or "||" to concatenate multiple "test" comman

Re: [msysGit] Re: [PATCH 0/5] First part of Unicode console support for msysgit

2014-06-06 Thread Stepan Kasal
Hello Karsten, On Fri, Jun 06, 2014 at 07:44:33PM +0200, Karsten Blees wrote: > Nicely done, thanks! thank you for your kind words. Please hold back, I will re-submit in a few days. > Note: this one was submitted seperately on May 29 and May 1 (can't > find it in the gmane archive, though). It

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Karsten Blees
Am 06.06.2014 13:10, schrieb Stepan Kasal: > Hi Karsten, > > On Fri, Jun 06, 2014 at 11:43:03AM +0200, Karsten Blees wrote: >> Thinking about this some more, the best solution is probably to >> eliminate the problem altogether by adding inline-wrappers for >> required CRT-functions, e.g.: > > Yes

Re: [PATCH 1/5] hashmap: add enum for hashmap free_entries option

2014-06-06 Thread Karsten Blees
Am 05.06.2014 08:06, schrieb Heiko Voigt: > This allows a reader to immediately know which options can be used and > what this parameter is about. > [...] > -void hashmap_free(struct hashmap *map, int free_entries) > +void hashmap_free(struct hashmap *map, enum hashmap_free_options > free_entries

Re: [PATCH 0/5] First part of Unicode console support for msysgit

2014-06-06 Thread Karsten Blees
Am 06.06.2014 15:42, schrieb Stepan Kasal: > Hello, > > this is first part of the unicode support pathes from msysgit. > Nicely done, thanks! I think its important to reiterate that these patches were written several years apart, so there are some inconsistencies and back-and-forth changes (e.

Re: [PATCH 1/2] userdiff: support C# async methods and correct C# keywords

2014-06-06 Thread Junio C Hamano
Steve Hoelzer writes: > On Thu, Jun 5, 2014 at 5:59 PM, Junio C Hamano wrote: >> Sup Yut Sum writes: >> >>> async is in C# 5.0 >>> foreach is in C# 1.0 >> >>> instanceof is in Java. The similar keywords are typeof, is, as in C# 1.0 >> >> This one made me read it twice, until I realized you mean

[PATCH] Use starts_with() for C strings instead of memcmp()

2014-06-06 Thread René Scharfe
Convert three cases of checking for a constant prefix using memcmp() to starts_with(). This way there is no need for magic string length constants and we avoid running over the end of the string should it be shorter than the prefix. Signed-off-by: Rene Scharfe --- These are the easy cases I foun

Re: Proposal for pruning tags

2014-06-06 Thread Junio C Hamano
Robert Dailey writes: > ... Having git clean up tags > automatically would really help with this, even though you may not > feel it's the responsibility of Git. It's more of a usability issue, I agree with "Having ... help with this". I did not say at all that it is not something Git should and

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-06 Thread Junio C Hamano
Christian Couder writes: > On Thu, Jun 5, 2014 at 11:49 PM, Junio C Hamano wrote: >> Christian Couder writes: >> >>> +static int create_graft(int argc, const char **argv, int force) >>> +{ >>> + unsigned char old[20], new[20]; >>> + const char *old_ref = argv[0]; >>> + struct commit

Re: [PATCH v2 10/11] test-lib: make it possible to override how test code is eval'd

2014-06-06 Thread Junio C Hamano
Richard Hansen writes: > On 2014-06-05 17:11, Junio C Hamano wrote: > ... >> In any case, the above explanation confuses me somewhat. test_eval_ >> is fed a scriptlet defined for various test_expect_success tests, >> and they are written in POSIX shells, not zsh, so wouldn't it be >> wrong to ru

Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-06 Thread Junio C Hamano
Heiko Voigt writes: > On Thu, Jun 05, 2014 at 07:48:33PM +1200, Chris Packham wrote: > ... >> I'm a little confused at how autoclone and autoinit differ. Aren't they >> the same? i.e. when this module appears grab it by default. I see >> autoupdate as a little different meaning update it if it's

Re: [PATCH 0/5] Windows dirent patches

2014-06-06 Thread Karsten Blees
Am 06.06.2014 15:43, schrieb Stepan Kasal: > Hello, > > This is a series of dirent modifications, 4 tiny ones and one bigger. > As the date indicates, these are battle tested in mysgit for several years. > The dates are actually missing from the patches, otherwise full ack from me. Thanks! --

GOOD DAY,

2014-06-06 Thread YAO YUTA
My name is Mr Yao Yuta from Hong Kong, I want you to be my partner in a business project. If Interested Contact me back via my email address. Thank you, Mr. Yao Yuta. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More ma

Re: [PATCH v3 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-06 Thread Christian Couder
On Thu, Jun 5, 2014 at 11:55 PM, Junio C Hamano wrote: > Christian Couder writes: > >> diff --git a/contrib/convert-grafts-to-replace-refs.sh >> b/contrib/convert-grafts-to-replace-refs.sh >> new file mode 100755 >> index 000..8472879 >> --- /dev/null >> +++ b/contrib/convert-grafts-to-repla

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-06 Thread Christian Couder
On Fri, Jun 6, 2014 at 5:29 PM, Christian Couder wrote: > > Yeah, or I could just rely on the fact that lookup_commit_or_die() > already parses the commit, with something like this: > > if (get_sha1(old_ref, old) < 0) > die(_("Not a valid object name: '%s'"), old_ref); > >

Feature Request: Fix/Make git-rebase work with git-subtree (was: Re: subtree merges lose prefix after rebase)

2014-06-06 Thread Eric Peters
Hi All ~ This is sort of re-open of a 2012 thread: http://git.661346.n2.nabble.com/subtree-merges-lose-prefix-after-rebase-td7332850.html A related stackoverflow post that describes the problem & a work-arounds/what was attempted to solve the problem: http://stackoverflow.com/questions/12858199/h

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-06 Thread Christian Couder
On Thu, Jun 5, 2014 at 11:49 PM, Junio C Hamano wrote: > Christian Couder writes: > >> +static int create_graft(int argc, const char **argv, int force) >> +{ >> + unsigned char old[20], new[20]; >> + const char *old_ref = argv[0]; >> + struct commit *commit; >> + struct strbuf buf

Re: [PATCH 2/2] mingw: avoid const warning

2014-06-06 Thread Karsten Blees
Am 29.05.2014 12:47, schrieb Stepan Kasal: > Fix const warnings in http-fetch.c and remote-curl.c main() where is > argv declared as const. > > The fix should work for all future declarations of main, no matter > whether the second parameter's type is "char**", "const char**", or > "char *[]". I'

[PATCH 02/20] contrib/examples/git-clone.sh: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto --- contrib/examples/git-clone.sh |2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH 01/20] check_bindir: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto --- check_bindir |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH 00/20] avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
These patch series convert test -a/-o to && and ||. This is the the third version. Changes: - Change the commit message for consistency with the comment to the patch to the CodingGuideline (Junio proposed patch http://www.spinics.net/lists/git/msg232199.html) expressing even better the meani

[PATCH 09/20] git-rebase--interactive.sh: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto --- git-rebase--interactive.sh |2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 03/20] contrib/examples/git-commit.sh: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto --- contrib/examples/git-commit.sh |4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 14/20] t/t4102-apply-rename.sh: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto --- t/t4102-apply-rename.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH 10/20] git-submodule.sh: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto --- git-submodule.sh | 32 1 file changed, 20 in

[PATCH 19/20] t/test-lib-functions.sh: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto --- t/test-lib-functions.sh |4 ++-- 1 file changed, 2 insertions(+), 2 deletio

[PATCH 20/20] CodingGuidelines: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Junio C Hamano Signed-off-by: Elia Pinto --- Documentation/CodingGuidelines | 12 ++

[PATCH 05/20] contrib/examples/git-repack.sh: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto --- contrib/examples/git-repack.sh |4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 17/20] t/t5538-push-shallow.sh: avoid "test -a/-o "

2014-06-06 Thread Elia Pinto
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test && test " spawning one extra process by using a single "test -a " no longer exists. Signed-off-by: Elia Pinto --- t/t5538-push-shallow.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-

  1   2   >