Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-07 Thread Martin von Zweigbergk
Trying again from plain old gmail which I think does not send a multipart content. On Fri, Nov 7, 2014 at 11:06 PM, Martin von Zweigbergk wrote: > Is this also related to "git checkout $rev ." not removing removed files? > What you say about the difference in implementation between checkout and >

[Bug Report] Refresh of a repository after changing line endings behaves erratically

2014-11-07 Thread Haim Gelfenbeyn
Hello, I found out that following steps outlined in https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings results in different outcomes from one execution to another, done on the same repository repeatedly: STEPS I TOOK: 1. Comitted .gi

[ANNOUNCE] Git v2.2.0-rc1

2014-11-07 Thread Junio C Hamano
A release candidate Git v2.2.0-rc1 is now available for testing at the usual places. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/testing/ The following public repositories all have a copy of the 'v2.2.0-rc1' tag and the 'master' branch that the tag points at: ur

Re: [PATCH] sparse: suppress an "using sizeof on a function" warning

2014-11-07 Thread ockham
Zitat von Junio C Hamano : Your patch is merely queued on 'pu' (proposed updates), which we all expect to be rerolled. You can just reroll another round, but you might want to wait a bit to see if there are more issues spotted by other people before doing so. Okay, I clearly need to acquaint

[PATCH] l10n: de.po: translate 62 new messages

2014-11-07 Thread Ralf Thielow
Translate 62 new messages came from git.pot update in 16742b0 (l10n: git.pot: proposed updates for v2.2.0 (+62)). Signed-off-by: Ralf Thielow --- po/de.po | 178 +-- 1 file changed, 82 insertions(+), 96 deletions(-) diff --git a/po/de.

Re: [PATCH 4/5] trailer: reuse ignore_non_trailer() to ignore conflict lines

2014-11-07 Thread Junio C Hamano
Christian Couder writes: > * Copyright (c) 2013, 2014 Christian Couder > @@ -791,14 +792,24 @@ static int process_input_file(struct strbuf **lines, > struct trailer_item **in_tok_last) > { > int count = 0; > - int patch_start, trailer_start, i; > + in

[PATCH v3 4/7] part4: l10n: de.po: use imperative form for command options

2014-11-07 Thread Ralf Thielow
Signed-off-by: Ralf Thielow --- po/de.po | 192 +++ 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/po/de.po b/po/de.po index 8071fd1..64ee621 100644 --- a/po/de.po +++ b/po/de.po @@ -5588,83 +5588,83 @@ msgstr "kann '%s'

[PATCH v3 1/7] part1: l10n: de.po: use imperative form for command options

2014-11-07 Thread Ralf Thielow
Signed-off-by: Ralf Thielow --- po/de.po | 166 +++ 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/po/de.po b/po/de.po index c807967..8782bd4 100644 --- a/po/de.po +++ b/po/de.po @@ -70,7 +70,7 @@ msgstr "Präfix" #: a

[PATCH v3 6/7] part6: l10n: de.po: use imperative form for command options

2014-11-07 Thread Ralf Thielow
Signed-off-by: Ralf Thielow --- po/de.po | 156 +++ 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/po/de.po b/po/de.po index f94d46f..5a1a61f 100644 --- a/po/de.po +++ b/po/de.po @@ -7942,11 +7942,11 @@ msgstr "nicht lös

[PATCH v3 5/7] part5: l10n: de.po: use imperative form for command options

2014-11-07 Thread Ralf Thielow
Signed-off-by: Ralf Thielow --- po/de.po | 162 +++ 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/po/de.po b/po/de.po index 64ee621..f94d46f 100644 --- a/po/de.po +++ b/po/de.po @@ -6749,7 +6749,7 @@ msgstr "Ausgabe rel

[PATCH v3 3/7] part3: l10n: de.po: use imperative form for command options

2014-11-07 Thread Ralf Thielow
Signed-off-by: Ralf Thielow --- po/de.po | 160 +++ 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/po/de.po b/po/de.po index 47b2d68..8071fd1 100644 --- a/po/de.po +++ b/po/de.po @@ -4648,31 +4648,31 @@ msgstr "interakti

[PATCH v3 7/7] part7: l10n: de.po: use imperative form for command options

2014-11-07 Thread Ralf Thielow
Signed-off-by: Ralf Thielow --- po/de.po | 162 +++ 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/po/de.po b/po/de.po index 5a1a61f..dea43e0 100644 --- a/po/de.po +++ b/po/de.po @@ -9479,35 +9479,35 @@ msgstr "Synonym f

[PATCH v3 2/7] part2: l10n: de.po: use imperative form for command options

2014-11-07 Thread Ralf Thielow
Signed-off-by: Ralf Thielow --- po/de.po | 148 +++ 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/po/de.po b/po/de.po index 8782bd4..47b2d68 100644 --- a/po/de.po +++ b/po/de.po @@ -3228,31 +3228,31 @@ msgstr "" #: b

[PATCH v3 0/7] use imperative form for command

2014-11-07 Thread Ralf Thielow
v3 is rebased on top of git-po's master branch. Thanks for review, Phillip. Ralf Thielow (7): part1: l10n: de.po: use imperative form for command options part2: l10n: de.po: use imperative form for command options part3: l10n: de.po: use imperative form for command options part4: l10n: de

Re: [PATCH] sparse: suppress an "using sizeof on a function" warning

2014-11-07 Thread Junio C Hamano
ock...@raz.or.at writes: > Hi Ramsay, > > and thanks for your fix! TBH, I didn't even notice that my patch had > already been committed and instead posted a refined version earlier > today [1] (which unfortunately didn't contain your fix, either). > > Not sure how to proceed. Maybe Junio can enlig

Re: [PATCH] sparse: suppress an "using sizeof on a function" warning

2014-11-07 Thread ockham
Zitat von Ramsay Jones : Commit d57da44b1 ("imap-send: use libcurl for implementation", 06-11-2014) updates the implementation of the imap-send command to make use of libcurl's high(er)-level API functions. In doing so, this introduces a sparse warning about "using sizeof on a function". In ord

Re: git commit --only -- $path when $path already has staged content

2014-11-07 Thread Junio C Hamano
Junio C Hamano writes: > In other words, you give paths from the command line to tell the > command that you want to record the contents of them in the working > tree as a whole to be recorded in the resulting commit. ... and --only/--include only makes difference wrt what happens to contents fr

[PATCH v3 1/7] receive-pack.c: add protocol support to negotiate atomic-push

2014-11-07 Thread Ronnie Sahlberg
This adds support to the protocol between send-pack and receive-pack to * allow receive-pack to inform the client that it has atomic push capability * allow send-pack to request atomic push back. There is currently no setting in send-pack to actually request that atomic pushes are to be used yet.

[PATCH v3 4/7] push.c: add an --atomic-push argument

2014-11-07 Thread Ronnie Sahlberg
Add a command line argument to the git push command to request atomic pushes. Signed-off-by: Ronnie Sahlberg --- Documentation/git-push.txt | 7 ++- builtin/push.c | 2 ++ transport.c| 1 + transport.h| 1 + 4 files changed, 10 insertions(+), 1 del

[PATCH v3 12/16] refs.c: make the *_packed_refs functions static

2014-11-07 Thread Ronnie Sahlberg
We no longer need to expose the lock/add/commit/rollback functions for packed refs anymore so make them static and remove them from the public api. Signed-off-by: Ronnie Sahlberg --- refs.c | 8 refs.h | 30 -- 2 files changed, 4 insertions(+), 34 deletions(

[PATCH v3 13/16] refs.c: replace the onerr argument in update_ref with a strbuf err

2014-11-07 Thread Ronnie Sahlberg
Get rid of the action_on_err enum and replace the action argument to update_ref with a strbuf *err for error reporting. Update all callers to the new api including two callers in transport*.c which used the literal 0 instead of an enum. Signed-off-by: Ronnie Sahlberg --- builtin/checkout.c |

[PATCH v3 14/16] refs.c: make add_packed_ref return an error instead of calling die

2014-11-07 Thread Ronnie Sahlberg
Change add_packed_ref to return an error instead of calling die(). Update all callers to check the return value of add_packed_ref. Signed-off-by: Ronnie Sahlberg --- refs.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index b59e2b8..0

[PATCH v3 15/16] refs.c: make lock_packed_refs take an err argument

2014-11-07 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- refs.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/refs.c b/refs.c index 0829c55..1314a9a 100644 --- a/refs.c +++ b/refs.c @@ -2398,13 +2398,17 @@ static int write_packed_entry_fn(struct ref_entry *entry, void

[PATCH v3 05/16] refs.c: add transaction support for renaming a reflog

2014-11-07 Thread Ronnie Sahlberg
Add a new transaction function transaction_rename_reflog. Signed-off-by: Ronnie Sahlberg --- refs.c | 72 +- refs.h | 8 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index e9e321e..8ca6add

[PATCH v3 6/7] refs.c: add an err argument to create_reflog

2014-11-07 Thread Ronnie Sahlberg
Add err argument to create_reflog that can explain the reason for a failure. This then eliminates the need to manage errno through this function since we can just add strerror(errno) to the err string when meaningful. No callers relied on errno from this function for anything else than the error me

[PATCH v3 5/7] t5543-atomic-push.sh: add basic tests for atomic pushes

2014-11-07 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- t/t5543-atomic-push.sh | 101 + 1 file changed, 101 insertions(+) create mode 100755 t/t5543-atomic-push.sh diff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh new file mode 100755 index 000..4903227

[PATCH v3 3/7] receive-pack.c: use a single transaction when atomic-push is negotiated

2014-11-07 Thread Ronnie Sahlberg
Update receive-pack to use an atomic transaction iff the client negotiated that it wanted atomic-push. This leaves the default behavior to be the old non-atomic one ref at a time update. This is to cause as little disruption as possible to existing clients. It is unknown if there are client scripts

[PATCH v3 7/7] refs.c: add an err argument to create_symref

2014-11-07 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- builtin/branch.c | 7 +-- builtin/checkout.c | 13 ++--- builtin/clone.c| 15 +++ builtin/init-db.c | 8 ++-- builtin/notes.c| 7 --- builtin/remote.c | 26 ++ builti

[PATCH v3 0/7] ref-transaction-send-pack

2014-11-07 Thread Ronnie Sahlberg
List, This series has been posted before but is now rebased on the previous ref-transaction-rename series that are against next. This series can also be found at : https://github.com/rsahlberg/git/tree/ref-transactions-send-pack This series finishes the transaction work to provide atomic pushes.

[PATCH v3 2/7] send-pack.c: add an --atomic-push command line argument

2014-11-07 Thread Ronnie Sahlberg
This adds support to send-pack to negotiate and use atomic pushes iff the server supports it. Atomic pushes are activated by a new command line flag --atomic-push. In order to do this we also need to change the semantics for send_pack() slightly. The existing send_pack() function actually don't se

[PATCH v3 02/16] refs.c: return error instead of dying when locking fails during transaction

2014-11-07 Thread Ronnie Sahlberg
Change lock_ref_sha1_basic to return an error instead of dying when we fail to lock a file during a transaction. This function is only called from transaction_commit() and it knows how to handle these failures. Signed-off-by: Ronnie Sahlberg Signed-off-by: Jonathan Nieder --- refs.c | 10 ++

[PATCH v3 03/16] refs.c: use packed refs when deleting refs during a transaction

2014-11-07 Thread Ronnie Sahlberg
Make the deletion of refs during a transaction more atomic. Start by first copying all loose refs we will be deleting to the packed refs file and then commit the packed refs file. Then re-lock the packed refs file to stop anyone else from modifying these refs and keep it locked until we are finishe

[PATCH v3 08/16] refs.c: move reflog updates into its own function

2014-11-07 Thread Ronnie Sahlberg
write_ref_sha1 tries to update the reflog while updating the ref. Move these reflog changes out into its own function so that we can do the same thing if we write a sha1 ref differently, for example by writing a ref to the packed refs file instead. No functional changes intended. We only move some

[PATCH v3 09/16] refs.c: write updates to packed refs when a transaction has more than one ref

2014-11-07 Thread Ronnie Sahlberg
When we are updating more than one single ref, i.e. not a commit, then write the updated refs directly to the packed refs file instead of writing them as loose refs. Change clone to use a transaction instead of using the packed refs API. This changes the behavior of clone slightly. Previously clon

[PATCH v3 06/16] refs.c: update rename_ref to use a transaction

2014-11-07 Thread Ronnie Sahlberg
Change refs.c to use a single transaction to perform the rename. Change the function to return 1 on failure instead of either -1 or 1. These changes make the rename_ref operation atomic. Signed-off-by: Ronnie Sahlberg --- refs.c| 168 ++---

[PATCH v3 07/16] refs.c: rollback the lockfile before we die() in repack_without_refs

2014-11-07 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg Signed-off-by: Jonathan Nieder --- refs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index 9a3c7fe..5a8f3da 100644 --- a/refs.c +++ b/refs.c @@ -2707,8 +2707,10 @@ int repack_without_refs(struct string_list *without, str

[PATCH v3 16/16] refs.c: add an err argument to pack_refs

2014-11-07 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- builtin/pack-refs.c | 8 +++- refs.c | 7 +++ refs.h | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c index b20b1ec..299768e 100644 --- a/builtin/pack-refs.c +++

[PATCH v3 11/16] refs.c: make repack_without_refs static

2014-11-07 Thread Ronnie Sahlberg
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 c1db86f..2c6b0f6 100644 --- a/refs.c +++ b/refs.c @@ -2668,7 +2668,7 @@ static int curate_packed_ref_fn(struct ref_entry *entry, void *cb_data) /

[PATCH v3 10/16] remote.c: use a transaction for deleting refs

2014-11-07 Thread Ronnie Sahlberg
Transactions now use packed refs when deleting multiple refs so there is no need to do it manually from remote.c any more. Signed-off-by: Ronnie Sahlberg --- builtin/remote.c | 80 1 file changed, 40 insertions(+), 40 deletions(-) diff --

[PATCH v3 01/16] refs.c: allow passing raw git_committer_info as email to _update_reflog

2014-11-07 Thread Ronnie Sahlberg
In many places in the code we do not have access to the individual fields in the committer data. Instead we might only have access to prebaked data such as what is returned by git_committer_info() containing a string that consists of email, timestamp, zone etc. This makes it inconvenient to use tr

[PATCH v3 00/16] ref-transaction-rename

2014-11-07 Thread Ronnie Sahlberg
List, Thsi series builds on the previous series : ref-transaction-reflog as applied to next. This series has been sent to the list before but is now rebased to current git next. This series can also be found at : https://github.com/rsahlberg/git/tree/ref-transactions-rename This series converts

[PATCH v3 04/16] refs.c: use a stringlist for repack_without_refs

2014-11-07 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- builtin/remote.c | 23 --- refs.c | 42 +- refs.h | 2 +- 3 files changed, 30 insertions(+), 37 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index c25420f..6806251

Re: [PATCH 2/5] trailer: display a trailer without its trailing newline

2014-11-07 Thread Junio C Hamano
Jeff King writes: > On Fri, Nov 07, 2014 at 07:50:49PM +0100, Christian Couder wrote: > >> diff --git a/trailer.c b/trailer.c >> index 761b763..f4d51ba 100644 >> --- a/trailer.c >> +++ b/trailer.c >> @@ -583,8 +583,12 @@ static int parse_trailer(struct strbuf *tok, >> struct strbuf *val, const ch

Re: [PATCH 2/5] trailer: display a trailer without its trailing newline

2014-11-07 Thread Jeff King
On Fri, Nov 07, 2014 at 07:50:49PM +0100, Christian Couder wrote: > diff --git a/trailer.c b/trailer.c > index 761b763..f4d51ba 100644 > --- a/trailer.c > +++ b/trailer.c > @@ -583,8 +583,12 @@ static int parse_trailer(struct strbuf *tok, struct > strbuf *val, const char *tra > strbuf_addch

Re: [PATCH 2/2] Let deny.currentBranch=updateInstead ignore submodules

2014-11-07 Thread Junio C Hamano
Johannes Schindelin writes: > They are not affected by the update anyway. > > Signed-off-by: Johannes Schindelin > --- > builtin/receive-pack.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c > index be4172f..4ba51df 10064

Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-07 Thread Jeff King
On Fri, Nov 07, 2014 at 09:14:42AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Is there a reason that we don't use this diff technique for checkout? > > I suspect that the reasons are probably mixture of these: > > (1) the code path may descend from checkout-index and predates the

Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-07 Thread Jeff King
On Fri, Nov 07, 2014 at 05:13:47PM +0700, Duy Nguyen wrote: > > By the way, one other thing I wondered while looking at this code: when > > we checkout a working tree file, we unlink the old one and write the new > > one in-place. Is there a particular reason we do this versus writing to > > a tem

Re: [PATCH 1/2] Add a few more values for receive.denyCurrentBranch

2014-11-07 Thread Johannes Schindelin
Hi Junio, On Fri, 7 Nov 2014, Junio C Hamano wrote: > [...] I will address your concerns after the weekend. Ciao, Johannes -- 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/major

Re: [PATCHv3 5/5] t3301: Use write_script(), nitpick whitespace

2014-11-07 Thread Junio C Hamano
Johan Herland writes: > Signed-off-by: Johan Herland > --- > > Drop this if it's too much churn. This is an overdue clean-up and because nobody else is working in the area, it is good to do so either as a preliminary clean-up or as a after-the-dust-settles clean-up for this series. These white

Re: [PATCHv3 4/5] notes: Empty notes should be shown by 'git log'

2014-11-07 Thread Junio C Hamano
Johan Herland writes: > If the user has gone through the trouble of explicitly adding an empty > note, then "git log" should not silently skip it (as if it didn't exist). > > Signed-off-by: Johan Herland > --- This makes sense and is in line with the theme of this series. > notes.c |

Re: [PATCH 1/2] Add a few more values for receive.denyCurrentBranch

2014-11-07 Thread Junio C Hamano
Johannes Schindelin writes: > Under certain circumstances, it makes a *lot* of sense to allow pushing > into the current branch. For example, when two machines with different > Operating Systems are required for testing, it makes much more sense to > synchronize between working directories than h

[PATCH 2/5] trailer: display a trailer without its trailing newline

2014-11-07 Thread Christian Couder
Trailers passed to the parse_trailer() function have a trailing newline. When erroring out, we should display the invalid trailer properly, that means without any trailing newline. Signed-off-by: Christian Couder --- trailer.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff -

[PATCH 0/5] Small "git interpret-trailers" fixes

2014-11-07 Thread Christian Couder
Here is a series to fix a few small bugs in "git interpret-trailers". Patch 1/5 and patch 2/5 are independent from the last 3 patches, and can be applied to master. Patches 3/5, 4/5 and 5/5 depend on this series by Junio: jc/conflict-hint (2014-10-28) 4 commits (merged to 'next

[PATCH 1/5] trailer: ignore comment lines inside the trailers

2014-11-07 Thread Christian Couder
Otherwise trailers that are commented out might be processed. We would also error out if the comment line char is also a separator. This means that comments inside a trailer block will disappear, but that was already the case anyway. Signed-off-by: Christian Couder --- trailer.c | 6 -- 1 f

[PATCH 3/5] commit: make ignore_non_trailer() non static

2014-11-07 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/commit.c | 46 -- commit.c | 46 ++ commit.h | 3 +++ 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/builtin/commit.c b/builtin/co

[PATCH 4/5] trailer: reuse ignore_non_trailer() to ignore conflict lines

2014-11-07 Thread Christian Couder
Make sure we look for trailers before any conflict line by reusing the ignore_non_trailer() function. Signed-off-by: Christian Couder --- t/t7513-interpret-trailers.sh | 2 ++ trailer.c | 25 ++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff -

[PATCH 5/5] trailer: add test with an old style conflict block

2014-11-07 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t7513-interpret-trailers.sh | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index fed053a..bd0ab46 100755 --- a/t/t7513-interpret-trailers.sh ++

Re: [PATCHv3 3/5] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-07 Thread Junio C Hamano
Johan Herland writes: > Although the "git notes" man page advertises that we support binary-safe > notes addition (using the -C option), we currently do not support adding > the empty note (i.e. using the empty blob to annotate an object). Instead, > an empty note is always treated as an intent t

Re: [PATCHv3 2/5] t3301: Verify that 'git notes' removes empty notes by default

2014-11-07 Thread Junio C Hamano
Johan Herland writes: > Add test cases documenting the current behavior when trying to > add/append/edit empty notes. This is in preparation for adding > --allow-empty; to allow empty notes to be stored. > > Improved-by: Eric Sunshine > Improved-by: Junio C Hamano > Signed-off-by: Johan Herland

Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-07 Thread Junio C Hamano
Jeff King writes: > Is there a reason that we don't use this diff technique for checkout? I suspect that the reasons are probably mixture of these: (1) the code path may descend from checkout-index and predates the in-core diff machinery; (2) in the context of checkout-index, it was mor

Re: git commit --only -- $path when $path already has staged content

2014-11-07 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Näwe writes: > >> The manpage of git commit reads: >> >> --only >> >> Make a commit only from the paths specified on the command line, >> disregarding any contents that have been staged so far. This is >> the default mode of operation of git co

Re: git commit --only -- $path when $path already has staged content

2014-11-07 Thread Junio C Hamano
Stefan Näwe writes: > The manpage of git commit reads: > > --only > > Make a commit only from the paths specified on the command line, > disregarding any contents that have been staged so far. This is > the default mode of operation of git commit if any paths are given >

Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-07 Thread Junio C Hamano
Duy Nguyen writes: > On Fri, Nov 7, 2014 at 3:38 PM, Jeff King wrote: >> On Fri, Nov 07, 2014 at 03:13:24AM -0500, Jeff King wrote: >> >>> I noticed that "git checkout $tree -- $path" will _always_ unlink and >>> write a new copy of each matching path, even if they are up-to-date with >>> the in

What is the default refspec for fetch?

2014-11-07 Thread Christian Halstrick
Hi, In a repo where no remote..fetch config parameter is set what should a "git fetch" do? My experiments let me think it's "HEAD:FETCH_HEAD". Right? I came to this question after finding out that when I clone repos in bare mode then they don't have and explicit remote..fetch in their config. But

[PATCH 2/2] Let deny.currentBranch=updateInstead ignore submodules

2014-11-07 Thread Johannes Schindelin
They are not affected by the update anyway. Signed-off-by: Johannes Schindelin --- builtin/receive-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index be4172f..4ba51df 100644 --- a/builtin/receive-pack.c +++ b/builtin/r

[PATCH 1/2] Add a few more values for receive.denyCurrentBranch

2014-11-07 Thread Johannes Schindelin
Under certain circumstances, it makes a *lot* of sense to allow pushing into the current branch. For example, when two machines with different Operating Systems are required for testing, it makes much more sense to synchronize between working directories than having to go via a third server. Under

[PATCH 0/2] Support updating working trees when pushing into non-bare repos

2014-11-07 Thread Johannes Schindelin
A few years ago, this developer was convinced that it was a bad idea to auto-update working directories when pushing into the current branch, and that an excellent way to prove this was to implement that feature. To his surprise, it turned out to be the one thing he misses most in upstream Git. So

[PATCH] sparse: suppress an "using sizeof on a function" warning

2014-11-07 Thread Ramsay Jones
Commit d57da44b1 ("imap-send: use libcurl for implementation", 06-11-2014) updates the implementation of the imap-send command to make use of libcurl's high(er)-level API functions. In doing so, this introduces a sparse warning about "using sizeof on a function". In order to suppress the warning,

Re: [PATCH] imap-send: use libcurl for implementation

2014-11-07 Thread Bernhard Reiter
Zitat von Junio C Hamano : > Bernhard Reiter writes: > >> @@ -25,7 +25,6 @@ Typical usage is something like: >> >> git format-patch --signoff --stdout --attach origin | git imap-send >> >> - >> OPTIONS > > Why? By mistake when rebasing. Sorry, fixed. (Same for previous -1360,12 hunk.) >> @@ -

git commit --only -- $path when $path already has staged content

2014-11-07 Thread Stefan Näwe
Hello. The manpage of git commit reads: --only Make a commit only from the paths specified on the command line, disregarding any contents that have been staged so far. This is the default mode of operation of git commit if any paths are given on the command line, in whi

Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-07 Thread Duy Nguyen
On Fri, Nov 7, 2014 at 3:38 PM, Jeff King wrote: > On Fri, Nov 07, 2014 at 03:13:24AM -0500, Jeff King wrote: > >> I noticed that "git checkout $tree -- $path" will _always_ unlink and >> write a new copy of each matching path, even if they are up-to-date with >> the index and the content in $tree

[PATCHv3 4/5] notes: Empty notes should be shown by 'git log'

2014-11-07 Thread Johan Herland
If the user has gone through the trouble of explicitly adding an empty note, then "git log" should not silently skip it (as if it didn't exist). Signed-off-by: Johan Herland --- notes.c | 3 +-- t/t3301-notes.sh | 12 2 files changed, 13 insertions(+), 2 deletions(-) diff

[PATCHv3 5/5] t3301: Use write_script(), nitpick whitespace

2014-11-07 Thread Johan Herland
Signed-off-by: Johan Herland --- Drop this if it's too much churn. ...Johan t/t3301-notes.sh | 254 +++ 1 file changed, 126 insertions(+), 128 deletions(-) diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh index f5d8193..80caee0 100755 --- a/

[PATCHv3 1/5] builtin/notes: Fix premature failure when trying to add the empty blob

2014-11-07 Thread Johan Herland
This fixes a small buglet when trying to explicitly add the empty blob as a note object using the -c or -C option to git notes add/append. Instead of failing with a nonsensical error message indicating that the empty blob does not exist, we should rather behave as if an empty notes message was give

[PATCHv3 2/5] t3301: Verify that 'git notes' removes empty notes by default

2014-11-07 Thread Johan Herland
Add test cases documenting the current behavior when trying to add/append/edit empty notes. This is in preparation for adding --allow-empty; to allow empty notes to be stored. Improved-by: Eric Sunshine Improved-by: Junio C Hamano Signed-off-by: Johan Herland --- t/t3301-notes.sh | 27

[PATCHv3 0/5] Handling empty notes

2014-11-07 Thread Johan Herland
Changes v1 -> v2: - Incorporate Eric's feedback - Factor out an initial fix, needed before adding the tests Changes v2 -> v3: - Incorporate Junio's feedback - Move tests from t3312 to t3301 - Refactor the display of empty notes (the part concerning git-log) into a separate follow-up patch

[PATCHv3 3/5] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-07 Thread Johan Herland
Although the "git notes" man page advertises that we support binary-safe notes addition (using the -C option), we currently do not support adding the empty note (i.e. using the empty blob to annotate an object). Instead, an empty note is always treated as an intent to remove the note altogether. I

Re: [PATCHv2 2/3] t3312-notes-empty: Test that 'git notes' removes empty notes by default

2014-11-07 Thread Johan Herland
On Wed, Nov 5, 2014 at 8:00 PM, Junio C Hamano wrote: > Johan Herland writes: >> +verify_missing() { >> + git log -1 > actual && > > Hmph, it was unclear what exactly you are trying to check with this > one and the other "git log -1 >expect_missing". > > Perhaps a comment that says "We are in

Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-07 Thread Jeff King
On Fri, Nov 07, 2014 at 03:13:24AM -0500, Jeff King wrote: > I noticed that "git checkout $tree -- $path" will _always_ unlink and > write a new copy of each matching path, even if they are up-to-date with > the index and the content in $tree is the same. By the way, one other thing I wondered wh

[RFC] git checkout $tree -- $path always rewrites files

2014-11-07 Thread Jeff King
I noticed that "git checkout $tree -- $path" will _always_ unlink and write a new copy of each matching path, even if they are up-to-date with the index and the content in $tree is the same. Here's a simple reproduction: # some repo with a file in it git init echo content >foo && git