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 add
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 while
On Wed, Nov 5, 2014 at 8:00 PM, Junio C Hamano gits...@pobox.com wrote:
Johan Herland jo...@herland.net 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
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
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.
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 sunsh...@sunshineco.com
Improved-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Johan
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
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 jo...@herland.net
---
notes.c | 3 +--
t/t3301-notes.sh | 12
2 files changed, 13 insertions(+), 2
Signed-off-by: Johan Herland jo...@herland.net
---
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
On Fri, Nov 7, 2014 at 3:38 PM, Jeff King p...@peff.net 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
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
Zitat von Junio C Hamano gits...@pobox.com:
Bernhard Reiter ock...@raz.or.at 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
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, we
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.
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.
They are not affected by the update anyway.
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de
---
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
---
Hi,
In a repo where no remote.name.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.name.fetch in
their
Duy Nguyen pclo...@gmail.com writes:
On Fri, Nov 7, 2014 at 3:38 PM, Jeff King p...@peff.net 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
Stefan Näwe stefan.na...@atlas-elektronik.com 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
Junio C Hamano gits...@pobox.com writes:
Stefan Näwe stefan.na...@atlas-elektronik.com 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
Jeff King p...@peff.net 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
Johan Herland jo...@herland.net 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 sunsh...@sunshineco.com
Improved-by: Junio C
Johan Herland jo...@herland.net 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
Make sure we look for trailers before any conflict line
by reusing the ignore_non_trailer() function.
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
t/t7513-interpret-trailers.sh | 2 ++
trailer.c | 25 ++---
2 files changed, 20
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 chrisc...@tuxfamily.org
---
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
builtin/commit.c | 46 --
commit.c | 46 ++
commit.h | 3 +++
3 files changed, 49 insertions(+), 46 deletions(-)
diff --git
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
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
---
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'
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 chrisc...@tuxfamily.org
---
trailer.c | 8 ++--
1 file changed, 6
Johannes Schindelin johannes.schinde...@gmx.de 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
Johan Herland jo...@herland.net 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 jo...@herland.net
---
This makes sense and is in line with the theme of this
Johan Herland jo...@herland.net writes:
Signed-off-by: Johan Herland jo...@herland.net
---
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
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
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 temporary
On Fri, Nov 07, 2014 at 09:14:42AM -0800, Junio C Hamano wrote:
Jeff King p...@peff.net 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
Johannes Schindelin johannes.schinde...@gmx.de writes:
They are not affected by the update anyway.
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de
---
builtin/receive-pack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/receive-pack.c
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(seps,
Jeff King p...@peff.net 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
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
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
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
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
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
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
---
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
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 sahlb...@google.com
---
builtin/remote.c | 80
1 file changed, 40 insertions(+), 40
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 sahlb...@google.com
Signed-off-by: Jonathan Nieder
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
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
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 sahlb...@google.com
---
refs.c| 168
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
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
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.
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
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
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
Add a new transaction function transaction_rename_reflog.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 72 +-
refs.h | 8
2 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
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 sahlb...@google.com
---
refs.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/refs.c
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
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 sahlb...@google.com
---
refs.c | 8
refs.h | 30 --
2 files changed, 4
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 sahlb...@google.com
---
Add a command line argument to the git push command to request atomic
pushes.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
Documentation/git-push.txt | 7 ++-
builtin/push.c | 2 ++
transport.c| 1 +
transport.h| 1 +
4 files changed, 10
Junio C Hamano gits...@pobox.com 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
Zitat von Ramsay Jones ram...@ramsay1.demon.co.uk:
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
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 enlighten?
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:
Signed-off-by: Ralf Thielow ralf.thie...@gmail.com
---
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
Signed-off-by: Ralf Thielow ralf.thie...@gmail.com
---
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
Signed-off-by: Ralf Thielow ralf.thie...@gmail.com
---
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
Signed-off-by: Ralf Thielow ralf.thie...@gmail.com
---
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 @@
Signed-off-by: Ralf Thielow ralf.thie...@gmail.com
---
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
Signed-off-by: Ralf Thielow ralf.thie...@gmail.com
---
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
Christian Couder chrisc...@tuxfamily.org writes:
* Copyright (c) 2013, 2014 Christian Couder chrisc...@tuxfamily.org
@@ -791,14 +792,24 @@ static int process_input_file(struct strbuf **lines,
struct trailer_item **in_tok_last)
{
int count = 0;
- int
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 ralf.thie...@gmail.com
---
po/de.po | 178 +--
1 file changed, 82 insertions(+), 96
Zitat von Junio C Hamano gits...@pobox.com:
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
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:
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
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
martinv...@gmail.com wrote:
Is this also related to git checkout $rev . not removing removed files?
What you say about the difference in implementation
77 matches
Mail list logo