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 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 this. > > It

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 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". It is somewhat odd

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 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 >> confi

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 > 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". It is s

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 >> wrote: >>> [...] > Sorry for the late reply, I actually had prepared a complete different > patch > for a different problem, but it touches the

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

2014-11-17 Thread Junio C Hamano
Michael Haggerty 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 then >> Git

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 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 code that comes _aft

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 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

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 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

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 proba

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

2014-11-17 Thread Junio C Hamano
Slavomir Vlcek 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 rooms for improveme

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 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 http://vger.

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

2014-11-17 Thread Junio C Hamano
Paul Smith writes: > From 545c0d526eaa41f9306b567275a7d53799987482 Mon Sep 17 00:00:00 2001 > From: Paul Smith > 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 these in your mail message body. The first

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

2014-11-17 Thread Junio C Hamano
Michael Haggerty 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 this list: send the

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 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, and the e

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

2014-11-17 Thread Matthieu Moy
Andreas Schwab 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 "unsubscribe git" in

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

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 wrote: > Stefan Beller 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 wor

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

2014-11-17 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller 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 with --stdout mode, woul

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

2014-11-17 Thread Junio C Hamano
Matthieu Moy writes: > Andreas Schwab 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 git add "a" would be equivalent to typing

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

2014-11-17 Thread Junio C Hamano
Junio C Hamano 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 line "unsubsc

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? Coul

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

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 gmail.com> writes: > > > > git ignore adds to .git/info/exclude > > This should be "git exclude" not "git ignore". > Difference between the two: http://stackoverflow.com/questions/10066749/git- > excludes-vs

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` rep

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 fi

Re: Fwd: Add git ignore as builtin

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

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg Update copy_fd to return a meaningful errno on failure and also preserve the existing errno variable. Signed-off-by: Ronnie Sahlberg Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- As announced in [1], I'm going to take over the ref-transactions-reflog

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 resoluti

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 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 it's very rare for zs

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 upda

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

2014-11-17 Thread Junio C Hamano
Stefan Beller 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 queued for a while,

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 wrote: >

Re: Merge without marking conflicts in working tree

2014-11-17 Thread Junio C Hamano
Aaron Schrab 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 " should give you something close to it. "merge-recursive" is probably beyond salvaging and coaxi

Re: Merge without marking conflicts in working tree

2014-11-17 Thread Andreas Schwab
Aaron Schrab 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. The vast m

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 > > Update copy_fd to return a meaningful errno on failure and also > preserve the existing errno variable.

Re: [PATCH] gc: support temporarily preserving garbage

2014-11-17 Thread Stefan Saasen
On 18 November 2014 08:34, Jeff King 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 locally o

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 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 >> >> Update copy_fd to return a mean

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

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 f

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 wrote: >> Stefan Beller wrote: >>> Update copy_fd to return a meaningful errno on failure and also >>> preserve the existing errno

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 them

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 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. > > But it's a li

[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 Signed-off-by: Ronnie Sahlberg Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- refs.c | 22 ++ refs.h | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/refs.c b/refs.c index 005eb18..05cb299 100644 --- a/refs.c +

[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 it

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg 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 allow broken refs. Sin

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg 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 Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- branch.c

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg Use a transaction for all updates during expire_reflog. Signed-off-by: Ronnie Sahlberg Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- builtin/reflog.c | 85 refs.c | 4 +-- refs.h

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg 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 Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- refs.c | 27 +++ 1

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg 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 should be generated

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg 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 already locked. Thi

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg 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 reflog. * Uncondition

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg 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 Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Bell

[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 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 Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg No one is using this function so we can delete it. Signed-off-by: Ronnie Sahlberg Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- refs.c | 7 --- refs.h | 9 + 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/refs.c b/refs.c ind

[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 Add a flag that allows us to truncate the reflog before we write the update. Signed-off-by: Ronnie Sahlberg Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- refs.c | 17 +++-- refs.h | 10 +- 2 files changed, 24 insertions(+), 3 deleti

[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 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 transactions too, which m

[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 unlock|close|commit_ref can be made static since there are no more external callers. Signed-off-by: Ronnie Sahlberg Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- refs.c | 24 refs.h | 9 - 2 files changed, 12 insertion

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 under

[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 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 i

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller --- builtin/remote.c | 23 --- refs.c | 42 +- refs.h | 2 +- 3 files changed, 30 insertions(+), 37 deletions(-) diff --git a/buil

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller --- 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 +++ b/refs.c @@ -2668,7 +2668,7 @@ static int curate_pac

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

2014-11-17 Thread Stefan Beller
From: 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 loc

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

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

[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 Signed-off-by: Ronnie Sahlberg Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- refs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index 780acd5..2db1dff 100644 --- a/refs.c +++ b/refs.c @@ -2707,8 +2707,10 @@ int

[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 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 Signed-off-by: Stefan Beller --- refs.c | 21 + 1 file changed, 17 insertions(+), 4 delet

[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 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 Sign

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

2014-11-17 Thread Stefan Beller
From: 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 int

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

2014-11-17 Thread Stefan Beller
From: 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 Signed-off-by: Stefan Beller --- refs.c | 8 refs.h | 30 -

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

2014-11-17 Thread Stefan Beller
From: 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 Signed-off-by: Stefan Beller --- builtin/remote.c | 80 1 fi

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg Add a new transaction function transaction_rename_reflog. Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller --- refs.c | 72 +- refs.h | 8 2 files changed, 79 insertions(+), 1 deletion(-

[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 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 s

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

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

[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 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

[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 i

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

2014-11-17 Thread Stefan Beller
From: 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 Signed-off-by: Stefan Beller --- refs.c|

[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. Vers

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

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

[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 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

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg Add a command line argument to the git push command to request atomic pushes. Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller --- Documentation/git-push.txt | 7 ++- builtin/push.c | 2 ++ transport.c| 1 + transport.h

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

2014-11-17 Thread Stefan Beller
From: 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 pus

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg 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 this function for anyt

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

2014-11-17 Thread Stefan Beller
From: 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() fu

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller --- 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-atom

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

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 thin

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

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 po

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

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 yo

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

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 no

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 informat

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 : 22

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 > inform

[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. Signed

  1   2   >