Re: [PATCH 1/1] gitk: po/ru.po russian translation typo fixed

2014-11-17 Thread Alex Kuleshov
Hello Max and Paul, thank you for your feedback, so what's must be my next workflow? Resend patch with Reviewed-By:... or somethine else? -- Best regards. 0xAX -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 2/2] config: clear the executable bits (if any) on $GIT_DIR/config

2014-11-17 Thread Michael Haggerty
On 11/16/2014 07:49 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: There is no reason for $GIT_DIR/config to be executable, plus this change will help clean up repositories affected by the bug that was fixed by the previous commit. I do not think we want to do

Re: [PATCH v2 2/2] config: clear the executable bits (if any) on $GIT_DIR/config

2014-11-17 Thread Michael Haggerty
On 11/16/2014 09:06 AM, Johannes Sixt wrote: Am 16.11.2014 um 08:21 schrieb Michael Haggerty: @@ -559,9 +562,21 @@ int cmd_config(int argc, const char **argv, const char *prefix) if (given_config_source.blob) die(editing blobs is not supported);

Re: [PATCH v2 1/2] create_default_files(): don't set u+x bit on $GIT_DIR/config

2014-11-17 Thread Torsten Bögershausen
On 11/17/2014 02:40 AM, Eric Sunshine wrote: On Sun, Nov 16, 2014 at 2:21 AM, Michael Haggerty mhag...@alum.mit.edu wrote: Since time immemorial, the test of whether to set core.filemode has been done by trying to toggle the u+x bit on $GIT_DIR/config and then testing whether the change took.

Re: [PATCH v2 1/2] create_default_files(): don't set u+x bit on $GIT_DIR/config

2014-11-17 Thread Michael Haggerty
On 11/16/2014 08:08 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: Since time immemorial, the test of whether to set core.filemode has been done by trying to toggle the u+x bit on $GIT_DIR/config and then testing whether the change took. It is somewhat odd to use the

Re: [PATCH v2 1/2] create_default_files(): don't set u+x bit on $GIT_DIR/config

2014-11-17 Thread Michael Haggerty
On 11/17/2014 02:40 AM, Eric Sunshine wrote: On Sun, Nov 16, 2014 at 2:21 AM, Michael Haggerty mhag...@alum.mit.edu wrote: Since time immemorial, the test of whether to set core.filemode has been done by trying to toggle the u+x bit on $GIT_DIR/config and then testing whether the change

Re: [PATCH v2 1/2] create_default_files(): don't set u+x bit on $GIT_DIR/config

2014-11-17 Thread Michael Haggerty
On 11/17/2014 10:08 AM, Torsten Bögershausen wrote: On 11/17/2014 02:40 AM, Eric Sunshine wrote: On Sun, Nov 16, 2014 at 2:21 AM, Michael Haggerty mhag...@alum.mit.edu wrote: [...] Sorry for the late reply, I actually had prepared a complete different patch for a different problem, but it

Re: [PATCH 2/2] config: clear the executable bits (if any) on $GIT_DIR/config

2014-11-17 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 11/16/2014 07:49 PM, Junio C Hamano wrote: ... So I would suggest not to spend any cycle or any code complexity to repair existing repositories. Having that bit on does not hurt anybody. Those who found it curious can flip that bit off and

Re: [PATCH v2 1/2] create_default_files(): don't set u+x bit on $GIT_DIR/config

2014-11-17 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: This seems like a one-off bug caused by a specific instance of odd code. It could only recur if somebody were to remove the line that I added, which would be a *very* odd mistake to make given that its purpose is pretty obvious. Or some other

Re: [PATCH 2/2] config: clear the executable bits (if any) on $GIT_DIR/config

2014-11-17 Thread Michael Haggerty
On 11/17/2014 04:33 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: On 11/16/2014 07:49 PM, Junio C Hamano wrote: ... So I would suggest not to spend any cycle or any code complexity to repair existing repositories. Having that bit on does not hurt anybody. Those

Re: [PATCH v2 1/2] create_default_files(): don't set u+x bit on $GIT_DIR/config

2014-11-17 Thread Michael Haggerty
On 11/17/2014 04:42 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: This seems like a one-off bug caused by a specific instance of odd code. It could only recur if somebody were to remove the line that I added, which would be a *very* odd mistake to make given that

Doing a git add '' will add more files then expected

2014-11-17 Thread Guilherme
Hello, I first asked on stackoverflow (http://stackoverflow.com/questions/26933761/python-sh-module-and-git-try-to-add-more-files-then-in-command/26934517#26934517) about this behaviour. Then on the conversation that happened on the git-users mailing list other agreed that this behaviour is

Re: [PATCH/RFC] builtin: move builtin retrieval to get_builtin()

2014-11-17 Thread Junio C Hamano
Slavomir Vlcek s...@inventati.org writes: I noticed that the patch has been modified (suggested 'static' scope modification, commit message) and added to the 'next' branch. So does this mean my task is done [...]? Even after the change hits 'next', other people may still find problems and

Re: [PATCH v2 1/2] create_default_files(): don't set u+x bit on $GIT_DIR/config

2014-11-17 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: I think the logic should be if test_have_prereq POSIXPERM test -x $1/config , right? Yeah ;-) -- 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

Re: [PATCH] git-new-workdir: Don't fail if the target directory is empty

2014-11-17 Thread Junio C Hamano
Paul Smith p...@mad-scientist.net writes: From 545c0d526eaa41f9306b567275a7d53799987482 Mon Sep 17 00:00:00 2001 From: Paul Smith p...@mad-scientist.net Date: Fri, 14 Nov 2014 17:11:19 -0500 Subject: [PATCH] git-new-workdir: Don't fail if the target directory is empty Please do not paste

Re: [PATCH] cmd_config(): Make a copy of path obtained from git_path()

2014-11-17 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: The strings returned by git_path() are recycled after a while. So make a copy of the config filename rather than holding onto the return value from git_path(). Good thinking. I agree that is an accident waiting to happen. -- To unsubscribe from

Re: [GIT PULL] l10n updates for 2.2.0

2014-11-17 Thread Junio C Hamano
Thanks. -- 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: Doing a git add '' will add more files then expected

2014-11-17 Thread Andreas Schwab
Guilherme guibuf...@gmail.com writes: Steps to reproduce: In bash (not sure this is bash specific) do: git add '' (that's to apostrophes, an empty argument) Results same as doing git add . Expected no files added or error about not finding file '' The argument to git add is a pathspec,

Re: Doing a git add '' will add more files then expected

2014-11-17 Thread Matthieu Moy
Andreas Schwab sch...@linux-m68k.org writes: The argument to git add is a pathspec, and the empty pathspec matches all files. Err, why does the empty pathspec match all files? Isn't that a bug? -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line

git merge a b when a == b but neither == o is always a successful merge?

2014-11-17 Thread Daniel Hagerty
Given a repository setup thusly: $ git --version git version 2.2.0.rc2 git init . echo '0.0' version git add version git commit -m master for i in a b ; do git checkout -b $i master echo '0.1' version git commit -a -m leg $i done git checkout -b c master echo '0.2' version git

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-17 Thread Stefan Beller
On Sun, Nov 16, 2014 at 10:40 AM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: +post-format-patch + + +This hook is called after format-patch created a patch and it is +invoked with the filename of the patch as the first parameter. Such an

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-17 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Stefan Beller sbel...@google.com writes: +post-format-patch + + +This hook is called after format-patch created a patch and it is +invoked with the filename of the patch as the first parameter. Such an interface would not work well

Re: Doing a git add '' will add more files then expected

2014-11-17 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Andreas Schwab sch...@linux-m68k.org writes: The argument to git add is a pathspec, and the empty pathspec matches all files. Err, why does the empty pathspec match all files? Isn't that a bug? That is debatable. cd Documentation

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-17 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: (I am not saying that there should be an easy way to drop cruft left by third-party systems such as Change-id: line) ... Heh, that was should not be, but I guess it was probably obvious. Sorry for the noise. -- To unsubscribe from this list: send the

Re: [PATCH v2 01/22] dir.c: optionally compute sha-1 of a .gitignore file

2014-11-17 Thread David Turner
On Sat, 2014-11-08 at 16:39 +0700, Nguyễn Thái Ngọc Duy wrote: + * If ss is not NULL, compute SHA-1 of the exclude file and fill + * stat data from disk (only valid if add_excludes returns zero). If + * ss_valid is non-zero, ss must contain good value as input. ss and ss_valid should be

Re: [PATCH v2 02/22] untracked cache: record .gitignore information and dir hierarchy

2014-11-17 Thread David Turner
On Sat, 2014-11-08 at 16:39 +0700, Nguyễn Thái Ngọc Duy wrote: + d = xmalloc(sizeof(*d) + len); + memset(d, 0, sizeof(*d) + len); + memcpy(d-name, name, len); calloc instead of malloc+memset? But do we really need this memset to include name if we're about to use a memcpy?

Re: git merge a b when a == b but neither == o is always a successful merge?

2014-11-17 Thread Jeff King
On Mon, Nov 17, 2014 at 01:39:43PM -0500, Daniel Hagerty wrote: git merge b produces a successful merge, as both branches perform the same work. Just to be clear, you were expecting git merge b to produce a conflict? For the body of content in question, this is a merge conflict. Git seems

Re: Fwd: Add git ignore as builtin

2014-11-17 Thread Jeff King
On Mon, Nov 17, 2014 at 12:12:25AM +, Ryan Jacobs wrote: Alberto Fanjul Alonso albertofanjul at gmail.com writes: git ignore whatever adds whatever to .git/info/exclude This should be git exclude not git ignore. Difference between the two:

Re: How safe are signed git tags? Only as safe as SHA-1 or somehow safer?

2014-11-17 Thread Jeff King
On Sun, Nov 16, 2014 at 03:31:10PM +, Patrick Schleizer wrote: How safe are signed git tags? Especially because git uses SHA-1. There is contradictory information around. So if one verifies a git tag (`git tag -v tagname`), then `checksout`s the tag, and checks that `git status` reports

Re: [PATCH] gc: support temporarily preserving garbage

2014-11-17 Thread Jeff King
On Fri, Nov 14, 2014 at 03:01:05PM -0800, Junio C Hamano wrote: 23 files changed, 375 insertions(+), 7 deletions(-) [...] I am not sure if this much of code churn is warranted to work around issues that only happen on repositories on NFS servers that do not keep open-but-deleted files

Re: Fwd: Add git ignore as builtin

2014-11-17 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Nov 17, 2014 at 12:12:25AM +, Ryan Jacobs wrote: Alberto Fanjul Alonso albertofanjul at gmail.com writes: git ignore whatever adds whatever to .git/info/exclude This should be git exclude not git ignore. Difference between the two:

[PATCH] copy.c: make copy_fd preserve meaningful errno

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Update copy_fd to return a meaningful errno on failure and also preserve the existing errno variable. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com

Re: git merge a b when a == b but neither == o is always a successful merge?

2014-11-17 Thread Daniel Hagerty
Just to be clear, you were expecting git merge b to produce a conflict? Yessir. I can imagine there might be times you would like to notice this case and visit it manually (e.g., even though the conflict would show both sides with the same content, you might want the resolution to

Re: difftool: honor --trust-exit-code for builtin tools

2014-11-17 Thread Aaron Schrab
At 10:11 -0800 16 Nov 2014, Junio C Hamano gits...@pobox.com wrote: It does not have any significance that a random shell implementation is not POSIX compliant. That would merely mean that such a shell cannot be used to run POSIX shell scripts like our Porcelain. Right, and I suspect that

Merge without marking conflicts in working tree

2014-11-17 Thread Aaron Schrab
Is there a way to do a merge but only record conflicts in the index, not update the working versions of files with conflict markers? Like many people, I use git to manage configuration files for my shell, editor, git itself, and a number of other things. The vast majority of times that I

Re: [PATCH] copy.c: make copy_fd preserve meaningful errno

2014-11-17 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: This patch was sent previously to the list as part of that series[2], but it seems to be unrelated to me. I am fine to queue obvious and trivial bits first before the larger main course. For now I'll queue this one and also the series that has been

Re: [PATCH] copy.c: make copy_fd preserve meaningful errno

2014-11-17 Thread Stefan Beller
I am reviewing the series and about to resend it with very minor nits fixed. I just want to point out this fix is orthogonal to the series and can be picked up no matter how long the reviewing/discussion of the series goes. Thanks, Stefan On Mon, Nov 17, 2014 at 3:08 PM, Junio C Hamano

Re: Merge without marking conflicts in working tree

2014-11-17 Thread Junio C Hamano
Aaron Schrab aa...@schrab.com writes: Is there a way to do a merge but only record conflicts in the index, not update the working versions of files with conflict markers? Not with Porcelain, but read-tree -m ancestor ours theirs should give you something close to it. merge-recursive is

Re: Merge without marking conflicts in working tree

2014-11-17 Thread Andreas Schwab
Aaron Schrab aa...@schrab.com writes: Is there a way to do a merge but only record conflicts in the index, not update the working versions of files with conflict markers? Like many people, I use git to manage configuration files for my shell, editor, git itself, and a number of other things.

Re: [PATCH] copy.c: make copy_fd preserve meaningful errno

2014-11-17 Thread Jonathan Nieder
Hi, Stefan Beller wrote: This patch was sent previously to the list as part of that series[2], but it seems to be unrelated to me. Thanks. Good call. [...] From: Ronnie Sahlberg sahlb...@google.com Update copy_fd to return a meaningful errno on failure and also preserve the existing

Re: [PATCH] gc: support temporarily preserving garbage

2014-11-17 Thread Stefan Saasen
On 18 November 2014 08:34, Jeff King p...@peff.net wrote: I am not sure if this much of code churn is warranted to work around issues that only happen on repositories on NFS servers that do not keep open-but-deleted files available. Is it an option to instead have a copy of repository

Re: [PATCH] copy.c: make copy_fd preserve meaningful errno

2014-11-17 Thread Stefan Beller
On Mon, Nov 17, 2014 at 3:35 PM, Jonathan Nieder jrnie...@gmail.com wrote: Hi, Stefan Beller wrote: This patch was sent previously to the list as part of that series[2], but it seems to be unrelated to me. Thanks. Good call. [...] From: Ronnie Sahlberg sahlb...@google.com Update

Re: [PATCH] gc: support temporarily preserving garbage

2014-11-17 Thread Jeff King
On Tue, Nov 18, 2014 at 10:59:14AM +1100, Stefan Saasen wrote: I am not sure if this much of code churn is warranted to work around issues that only happen on repositories on NFS servers that do not keep open-but-deleted files available. Is it an option to instead have a copy of

Re: [RFC] On watchman support

2014-11-17 Thread David Turner
On Tue, 2014-11-11 at 19:49 +0700, Duy Nguyen wrote: I've come to the last piece to speed up git status, watchman support. And I realized it's not as good as I thought. Watchman could be used for two things: to avoid refreshing the index, and to avoid searching for ignored files. The first

Re: [PATCH] copy.c: make copy_fd preserve meaningful errno

2014-11-17 Thread Jonathan Nieder
(meta-comment: please snip out the context you are not responding to, to make reading easier) Stefan Beller wrote: On Mon, Nov 17, 2014 at 3:35 PM, Jonathan Nieder jrnie...@gmail.com wrote: Stefan Beller wrote: Update copy_fd to return a meaningful errno on failure and also preserve the

Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Mike Hommey
Hi, For some reason, I need to know the sha1 corresponding to some marks I'm putting in a fast-import stream. Unfortunately, this does not appear to be possible. - I'd rather not require a checkpoint to export marks each time I need such a sha1, and I'd rather not do that work that requires

Re: [PATCH] copy.c: make copy_fd preserve meaningful errno

2014-11-17 Thread Stefan Beller
On Mon, Nov 17, 2014 at 4:48 PM, Jonathan Nieder jrnie...@gmail.com wrote: (meta-comment: please snip out the context you are not responding to, to make reading easier) will do After this patch, setting errno is not part of the contract of copy_fd, so the bug Ronnie was fixing is gone.

[PATCH v3 02/14] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 22 ++ refs.h | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-)

[PATCH v3 00/14] ref-transactions-reflog

2014-11-17 Thread Stefan Beller
Hi, The following patch series updates the reflog handling to use transactions. This patch series has previously been sent to the list[1]. This series converts the reflog handling and builtin/reflog.c to use a transaction for both the ref as well as the reflog updates. As a side effect of this

[PATCH v3 14/14] refs.c: allow deleting refs with a broken sha1

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add back support to make it possible to delete refs that have a broken sha1. Add new internal flags REF_ALLOW_BROKEN and RESOLVE_REF_ALLOW_BAD_SHA1 to pass intent from branch.c that we are willing to allow resolve_ref_unsafe and lock_ref_sha1_basic to

[PATCH v3 03/14] refs.c: rename the transaction functions

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Rename the transaction functions. Remove the leading ref_ from the names and append _ref to the names for functions that create/delete/ update sha1 refs. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com

[PATCH v3 10/14] reflog.c: use a reflog transaction when writing during expire

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Use a transaction for all updates during expire_reflog. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 85

[PATCH v3 05/14] refs.c: add a new update_type field to ref_update

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add a field that describes what type of update this refers to. For now the only type is UPDATE_SHA1 but we will soon add more types. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by:

[PATCH v3 08/14] refs.c: only write reflog update if msg is non-NULL

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com When performing a reflog transaction update, only write to the reflog iff msg is non-NULL. This can then be combined with REFLOG_TRUNCATE to perform an update that only truncates but does not write. This change only affects whether or not a reflog entry

[PATCH v3 09/14] refs.c: allow multiple reflog updates during a single transaction

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Allow to make multiple reflog updates to the same ref during a transaction. This means we only need to lock the reflog once, during the first update that touches the reflog, and that all further updates can just write the reflog entry since the reflog is

[PATCH v3 11/14] refs.c: rename log_ref_setup to create_reflog

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com log_ref_setup is used to do several semi-related things: * Sometimes it will create a new reflog including missing parent directories and cleaning up any conflicting stale directories in the path. * Fill in a filename buffer for the full path to the

[PATCH v3 06/14] refs.c: add a transaction function to append a reflog entry

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Define a new transaction update type, UPDATE_LOG, and a new function transaction_update_reflog. This function will lock the reflog and append an entry to it during transaction commit. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by:

[PATCH v3 01/14] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com The ref_transaction_update function can already be used to create refs by passing null_sha1 as the old_sha1 parameter. Simplify by replacing transaction_create with a thin wrapper. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by:

[PATCH v3 13/14] refs.c: remove lock_any_ref_for_update

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com No one is using this function so we can delete it. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 7 --- refs.h | 9 + 2 files

[PATCH v3 07/14] refs.c: add a flag to allow reflog updates to truncate the log

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add a flag that allows us to truncate the reflog before we write the update. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 17

[PATCH v3 04/14] refs.c: add a function to append a reflog entry to a fd

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Break out the code to create the string and writing it to the file descriptor from log_ref_write and add it into a dedicated function log_ref_write_fd. For now this is only used from log_ref_write, but later on we will call this function from reflog

[PATCH v3 12/14] refs.c: Remove unlock_ref/close_ref/commit_ref from the refs api

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com unlock|close|commit_ref can be made static since there are no more external callers. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 24

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Jonathan Nieder
Mike Hommey wrote: - fast-import's `ls` command documentation about its output format mentions that the output may contain commits, so I tried the trick of creating a tree with commits, but fast-import then fails with: fatal: Not a blob (actually a commit) which I totally

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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,

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/remote.c | 23 --- refs.c | 42 +- refs.h | 2 +- 3 files

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 2 +- refs.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 130d240..899c33e 100644 --- a/refs.c

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/pack-refs.c | 8 +++- refs.c | 7 +++ refs.h | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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 Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 21

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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:

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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 Signed-off-by: Stefan Beller sbel...@google.com ---

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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 Signed-off-by: Stefan Beller sbel...@google.com --- builtin/remote.c | 80

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add a new transaction function transaction_rename_reflog. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 72 +- refs.h | 8

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/refs.c b/refs.c index c59cc3f..725945e 100644

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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

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

2014-11-17 Thread Stefan Beller
Hi, This series builds on the previous series : ref-transaction-reflog as applied to master. This series has been sent to the list before[1] This series can also be found at github[2] as well as googlesource[3]. This series converts ref rename to use a transaction. This addesses several issues

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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 Signed-off-by:

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

2014-11-17 Thread Stefan Beller
Hi, This series has been posted before[1], but is now rebased on the previous ref-transaction-rename. It can also be found at github[2] and googlesource[3] This series finishes the transaction work to provide atomic pushes. With this series we can now perform atomic pushes to a repository.

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/branch.c | 7 +-- builtin/checkout.c | 13 ++--- builtin/clone.c| 15 +++ builtin/init-db.c |

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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

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

2014-11-17 Thread Stefan Beller
From: 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 Signed-off-by: Stefan Beller sbel...@google.com --- Documentation/git-push.txt | 7 ++- builtin/push.c | 2

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add an 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

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- t/t5543-atomic-push.sh | 101 + 1 file changed, 101 insertions(+) create mode 100755

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Mike Hommey
On Tue, Nov 18, 2014 at 09:34:26AM +0900, Mike Hommey wrote: Hi, For some reason, I need to know the sha1 corresponding to some marks I'm putting in a fast-import stream. Unfortunately, this does not appear to be possible. - I'd rather not require a checkpoint to export marks each time I

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-17 Thread Stefan Beller
Junio, thanks for pointing out, why my patch doesn't make sense here. Do we have similar filters somewhere in place already, so I could have a look at the code architecture, the api, and how the user would operate that? The way you're proposing, doesn't sound as if a hook would be the right

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Mike Hommey
On Mon, Nov 17, 2014 at 05:40:28PM -0800, Jonathan Nieder wrote: Mike Hommey wrote: - fast-import's `ls` command documentation about its output format mentions that the output may contain commits, so I tried the trick of creating a tree with commits, but fast-import then fails with:

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Mike Hommey
On Tue, Nov 18, 2014 at 11:21:37AM +0900, Mike Hommey wrote: On Tue, Nov 18, 2014 at 09:34:26AM +0900, Mike Hommey wrote: Hi, For some reason, I need to know the sha1 corresponding to some marks I'm putting in a fast-import stream. Unfortunately, this does not appear to be possible.

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Jonathan Nieder
Mike Hommey wrote: On Mon, Nov 17, 2014 at 05:40:28PM -0800, Jonathan Nieder wrote: How did you get that Not a blob message? When trying to *create* a tree with a commit in it, so instead of giving the mark for a blob to a filemodify command, giving a mark for a commit. That is what fails

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Jonathan Nieder
Mike Hommey wrote: BTW, if it so happens that all the operations that were done end up creating objects that already existed for some reason, checkpoint doesn't do anything, which is fine for the pack and tags, but not necessarily so for export-marks. Does something like this help? Do you

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Mike Hommey
On Mon, Nov 17, 2014 at 06:51:31PM -0800, Jonathan Nieder wrote: Mike Hommey wrote: On Mon, Nov 17, 2014 at 05:40:28PM -0800, Jonathan Nieder wrote: How did you get that Not a blob message? When trying to *create* a tree with a commit in it, so instead of giving the mark for a blob to

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Mike Hommey
On Mon, Nov 17, 2014 at 06:53:59PM -0800, Jonathan Nieder wrote: Mike Hommey wrote: BTW, if it so happens that all the operations that were done end up creating objects that already existed for some reason, checkpoint doesn't do anything, which is fine for the pack and tags, but not

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Jonathan Nieder
Mike Hommey wrote: And while I'm here, it's sad that one needs to emit a dummy cat-blob or ls command to wait for a checkpoint to be finished That's a good point. (Though relying on checkpoints to read back information is an ugly trick, so if we can get other commands to provide the

Re: [GIT PULL] l10n updates for 2.2.0

2014-11-17 Thread Jiang Xin
Hi Junio, Please pull again in order to merge Catalan translation. Now l10n for Git 2.2.0 is almost completed. bg.po : 2296 translated messages. ca.po : 2296 translated messages. de.po : 2293 translated messages, 2 untranslated messages. fr.po :

Re: Getting a commit sha1 from fast-import in a remote-helper

2014-11-17 Thread Mike Hommey
On Mon, Nov 17, 2014 at 07:27:41PM -0800, Jonathan Nieder wrote: Mike Hommey wrote: And while I'm here, it's sad that one needs to emit a dummy cat-blob or ls command to wait for a checkpoint to be finished That's a good point. (Though relying on checkpoints to read back information is

[PATCH/RFC] Add contrib Clearcase Base import utility

2014-11-17 Thread Jason Woodward
This is a simple perl script that dumps the history of a Base Clearcase VOB and then walks this history retrieving the file contents, version, and branch information. Equivalent git commits are created from the Clearcase history via git-fast-import(1). This does not support Clearcase UCM.

  1   2   >