[PATCH/RFC] add: support saving the last versions of the index

2013-08-03 Thread Nguyễn Thái Ngọc Duy
When you do "git add foo", change "foo" and "git add foo" again, the previous foo version is still in the repository, but its SHA-1 may be lost. "git fsck --lost-found" may help, but it may take more time to find out which blob is the old "foo". This patch adds support for saving old index files,

Re: [PATCH] Add missing test file for UTF-16.

2013-08-03 Thread Duy Nguyen
On Sun, Aug 4, 2013 at 12:26 AM, brian m. carlson wrote: > The test file that the UTF-16 rejection test looks for is missing, but this > went > unnoticed because the test is expected to fail anyway; as a consequence, the > test fails because the file containing the commit message is missing, and

Re: [bug] remotes-hg: timezones are transformed

2013-08-03 Thread Felipe Contreras
Hi, On Sat, Aug 3, 2013 at 11:36 AM, Jörn Hees wrote: > it seems that if you use the 1.8.3.4 remote-helpers/git-remote-hg to clone a > mercurial repo the timezone information of commits gets transformed into your > current timezone. > (command: git clone hg::…) > > I noticed this when a collea

Re: Bug: Pulling remotes into an empty repo deletes the index

2013-08-03 Thread Adam A
On Sun, Aug 4, 2013 at 2:57 AM, Jonathan Nieder wrote: > Daniel Convissor wrote: > >> All is not lost. Your local files should be stored in the repository's >> reflog. Examine the output of "git reflog". You can then reset your >> working directory to obtain those files by doing something _like

Re: [PATCH 3/4] gitweb: omit the repository owner when it is unset

2013-08-03 Thread Jakub Narębski
On Tue, Jul 2, 2013 at 6:24 PM, Tony Finch wrote: > On the repository summary page, leave the whole owner line out if > the repo does not have an owner, rather than displaying a labelled > empty field.. Note that if $omit_owner is true, whole _column_ is skipped. Is removing cell (instead of le

Re: [PATCH 4/4] gitweb: make search help link less ugly

2013-08-03 Thread Jakub Narębski
On Tue, Jul 9, 2013 at 7:15 PM, Tony Finch wrote: > The search help link was a superscript question mark right next to > a drop-down menu, which looks misaligned I think the idea was to simulate footnote explaining search terms (I think, I am not the author of this feature)... >

Re: [PATCH 2/2] howto: Eliminate all tabs

2013-08-03 Thread Piotr Krukowiecki
Junio C Hamano napisał: >Besides, the tab width of our source is 8, period. Get over it. Isn't the howto documentation intended (mainly/also) for the users of git, not the developers? -- Piotr Krukowiecki -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a mes

Re: [PATCH 2/2] submodule: don't print status output with ignore=all

2013-08-03 Thread Jonathan Nieder
brian m. carlson wrote: > git status prints information for submodules, but it should ignore the status > of > those which have submodule..ignore set to all. Fix it so that it does > properly ignore those which have that setting either in .git/config or in > .gitmodules. > > Signed-off-by: brian

Re: [PATCH 1/2] submodule: fix confusing variable name

2013-08-03 Thread Jonathan Nieder
brian m. carlson wrote: > cmd_summary reads the output of git diff, but reads in the submodule > path into a variable called name. Since this variable does not > contain the name of the submodule, but the path, rename it to be > clearer what data it actually holds. Nice. Reviewed-by: Jonathan N

[PATCH] Add missing test file for UTF-16.

2013-08-03 Thread brian m. carlson
The test file that the UTF-16 rejection test looks for is missing, but this went unnoticed because the test is expected to fail anyway; as a consequence, the test fails because the file containing the commit message is missing, and not because the test file contains a NUL byte. Fix this by includi

[PATCH 2/2] submodule: don't print status output with ignore=all

2013-08-03 Thread brian m. carlson
git status prints information for submodules, but it should ignore the status of those which have submodule..ignore set to all. Fix it so that it does properly ignore those which have that setting either in .git/config or in .gitmodules. Signed-off-by: brian m. carlson --- git-submodule.sh | 2

[PATCH 1/2] submodule: fix confusing variable name

2013-08-03 Thread brian m. carlson
cmd_summary reads the output of git diff, but reads in the submodule path into a variable called name. Since this variable does not contain the name of the submodule, but the path, rename it to be clearer what data it actually holds. Signed-off-by: brian m. carlson --- git-submodule.sh | 8

Don't print status output with submodule..ignore=all

2013-08-03 Thread brian m. carlson
There are configuration options for each submodule that specify under what circumstances git status should display output for that submodule. Unfortunately, these settings were not being respected, and as such the tests were marked TODO. This patch series consists of two patches: the first is a fi

Re: change remote to track new branch

2013-08-03 Thread Jonathan Nieder
Daniel Convissor wrote: > On Sat, Aug 03, 2013 at 09:14:59AM +0200, Andreas Schwab wrote: >> Use "git remote set-branches" to change the tracked branches of a >> remote. Use "git branch --set-upstream-to" to change the upstream of a >> branch (or create a new branch from the new upstream). > > Th

Re: Bug: Pulling remotes into an empty repo deletes the index

2013-08-03 Thread Daniel Convissor
Heya: On Sat, Aug 03, 2013 at 09:57:28AM -0700, Jonathan Nieder wrote: > > Adam hadn't made a commit, so that wouldn't work in this case. Oh, good catch. I saw the add and assumed there was a commit there. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y

Re: Bug: Pulling remotes into an empty repo deletes the index

2013-08-03 Thread Daniel Convissor
Hey Again Adam: On Sat, Aug 03, 2013 at 12:39:15PM -0400, Daniel Convissor wrote: > > All is not lost. Your local files should be stored in the repository's > reflog. Examine the output of "git reflog". You can then reset your > working directory to obtain those files by doing something _like_

Re: Bug: Pulling remotes into an empty repo deletes the index

2013-08-03 Thread Jonathan Nieder
Daniel Convissor wrote: > All is not lost. Your local files should be stored in the repository's > reflog. Examine the output of "git reflog". You can then reset your > working directory to obtain those files by doing something _like_ > "git reset --hard HEAD@{1}". Adam hadn't made a commit, s

Re: change remote to track new branch

2013-08-03 Thread Daniel Convissor
Hi Andreas: On Sat, Aug 03, 2013 at 06:41:46PM +0200, Andreas Schwab wrote: > Daniel Convissor writes: > > Use git config. Yeah. I had contemplated using the following commands: git config remote.wp.fetch \ "+refs/heads/3.6-branch:refs/remotes/wp/3.6-branch" git config branch.

Re: change remote to track new branch

2013-08-03 Thread Andreas Schwab
Daniel Convissor writes: > Thanks. Those commands were introduced in 1.8. Is there a way to do it > in 1.7, please? Use git config. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely di

Re: Bug: Pulling remotes into an empty repo deletes the index

2013-08-03 Thread Daniel Convissor
Hi Adam: On Sat, Aug 03, 2013 at 10:01:30PM +1000, Adam A wrote: > - create a remote repository at URL with commit(s) in it > - e.g., a new github repo with README and LICENSE files auto-added > - write some files in a local directory > - git init > - git add . > - the contents of the director

[bug] remotes-hg: timezones are transformed

2013-08-03 Thread Jörn Hees
Hi, it seems that if you use the 1.8.3.4 remote-helpers/git-remote-hg to clone a mercurial repo the timezone information of commits gets transformed into your current timezone. (command: git clone hg::…) I noticed this when a colleague in another timezone used Kiln to also export the same merc

Re: change remote to track new branch

2013-08-03 Thread Daniel Convissor
Hi Andreas: On Sat, Aug 03, 2013 at 09:14:59AM +0200, Andreas Schwab wrote: > Daniel Convissor writes: > > > Long ago I added a remote to my repo. It is set to track what was then > > WordPress' main release branch (3.4-branch) and created a local branch > > to use it. Well, time marches on.

Re: git replace: should it check for object type, and can it replace merges?

2013-08-03 Thread Thomas Rast
"Philip Oakley" writes: > A recent comment http://stackoverflow.com/a/18027030/717355 on a > question I asked two years ago about 'grafts' and 'replace' indicates > that users think that 'git replace' can't replace a merge commit. The > documentation doesn't have any examples and gives the naive

git replace: should it check for object type, and can it replace merges?

2013-08-03 Thread Philip Oakley
A recent comment http://stackoverflow.com/a/18027030/717355 on a question I asked two years ago about 'grafts' and 'replace' indicates that users think that 'git replace' can't replace a merge commit. The documentation doesn't have any examples and gives the naive impression that one should onl

Re: [PATCH 00/11] blame/log -L: additional tests and bug fixes

2013-08-03 Thread Thomas Rast
Eric Sunshine writes: > While working on multiple -L support for git-blame, I encountered more > issues with the existing -L facility in git-blame and git-log. This > series fixes these problems and adds a slew of new tests. > > Patch 6/11 (t4211: retire soon-to-be unimplementable tests) may be >

[PATCH] fix typo in documentation of git-svn

2013-08-03 Thread Felix Gruber
Signed-off-by: Felix Gruber --- Documentation/git-svn.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index aad452f..8845e10 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -256,7 +256,7 @@

Re: What's cooking in git.git (Jul 2013, #09; Mon, 29)

2013-08-03 Thread Mark Levedahl
On 08/01/2013 05:12 PM, Junio C Hamano wrote: Ramsay Jones writes: Junio C Hamano wrote: Ramsay Jones writes: I am personally in favor of this simpler solution. Comments? I had expected this to me marked for 'master'. Has this simply been overlooked, or do you have reservations about

Re: Bug: Pulling remotes into an empty repo deletes the index

2013-08-03 Thread Adam A
Hello, the project readme on github points here for submitting bug reports, but please let me know if I'm in the wrong place. Steps to reproduce: - create a remote repository at URL with commit(s) in it - e.g., a new github repo with README and LICENSE files auto-added - write some files in a l

Re: [PATCHv3 0/9] Removing deprecated parsing macros

2013-08-03 Thread Stefan Beller
On 08/03/2013 01:51 PM, Stefan Beller wrote: > Suggested changes by Eric Sunshine included. > The patches still apply on top of origin/jc/parseopt-command-modes signature.asc Description: OpenPGP digital signature

[PATCH] .mailmap: Multiple addresses of Michael S. Tsirkin

2013-08-03 Thread Stefan Beller
Acked-by: Michael S. Tsirkin Signed-off-by: Stefan Beller --- .mailmap | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.mailmap b/.mailmap index 57551b0..dfa2e65 100644 --- a/.mailmap +++ b/.mailmap @@ -130,6 +130,9 @@ Matthias Urlichs Matthias Urlichs Michael Coleman Michael J Gr

[PATCHv3 1/9] Remove deprecated OPTION_BOOLEAN for parsing arguments

2013-08-03 Thread Stefan Beller
As of b04ba2bb4 OPTION_BOOLEAN was deprecated. This commit removes all occurrences of OPTION_BOOLEAN. In b04ba2bb4 Junio suggested to replace it with either OPTION_SET_INT or OPTION_COUNTUP instead. However a pattern, which occurred often with the OPTION_BOOLEAN was a hidden boolean parameter. So I

[PATCHv3 9/9] revert: use the OPT_CMDMODE for parsing, reducing code

2013-08-03 Thread Stefan Beller
The revert command comes with their own implementation of checking for exclusiveness of parameters. Now that the OPT_CMDMODE is in place, we can also rely on that macro instead of cooking that solution for each command itself. This commit also replaces OPT_BOOLEAN, which was deprecated by b04ba2bb

[PATCHv3 4/9] checkout: remove superfluous local variable

2013-08-03 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/checkout.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 8b48f4a..ed39cec 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -228,8 +228,6 @@ static int checkout_path

[PATCHv3 6/9] hash-object: Replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP

2013-08-03 Thread Stefan Beller
This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27). hash-object is a plumbing layer command, so better not change the input/output behavior for now. Unfortunately we have these lines relying on the count up mechanism of OPT_BOOLEAN: if (hashstdin > 1)

[PATCHv3 8/9] checkout-index: Fix negations of even numbers of -n

2013-08-03 Thread Stefan Beller
The --no-create was parsed with OPT_BOOLEAN, which has a counting up logic implemented. Since b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27) the OPT_BOOLEAN is deprecated and is only a define: /* Deprecated synonym */ #define OPTION_BOOLEAN OPTION_COUNTUP However the v

[PATCHv3 5/9] branch, commit, name-rev: ease up boolean conditions

2013-08-03 Thread Stefan Beller
Now that the variables are readin by OPT_BOOL, which makes sure to have the values being 0 or 1 after reading, we do not need the double negation to map any other value to 1 for integer variables. Signed-off-by: Stefan Beller --- builtin/branch.c | 3 ++- builtin/commit.c | 2 +- builtin/nam

[PATCHv3 3/9] log, format-patch: parsing uses OPT__QUIET

2013-08-03 Thread Stefan Beller
This patch allows users to use the short form -q on log and format-patch, which was non possible before. Also the documentation of format-patch mentions -q now. The documentation of log doesn't even talk about --quiet, so I'll leave that for more experienced git contributors. ;) It doesn't seem t

[PATCHv3 0/9] Removing deprecated parsing macros

2013-08-03 Thread Stefan Beller
Suggested changes by Eric Sunshine included. Within the builtin/ folder all occurrences of OPT_BOOLEAN have been removed. Now we only need to review the usage of it in parse-options as used in OPT__VERBOSE, OPT__QUIET, OPT__DRY_RUN and OPT__FORCE. Most likely we could just use OPT_SET_INT there an

[PATCHv3 7/9] config parsing options: allow one flag multiple times

2013-08-03 Thread Stefan Beller
This task emerged from b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27). This commit introduces a change for the users, after this patch you can pass one of the config level flags multiple times: Before: $ git config --global --global --list error: only one config file a

Re: [PATCH v2] l10n: de.po: translate 99 new messages

2013-08-03 Thread Thomas Rast
Ralf Thielow writes: > Translate 99 new messages came from git.pot update in > 28b3cff (l10n: git.pot: v1.8.4 round 1 (99 new, 46 removed)). > > Signed-off-by: Ralf Thielow Acked-by: Thomas Rast Thanks for your work! -- Thomas Rast trast@{inf,student}.ethz.ch -- To unsubscribe from this lis

Re: What's cooking in git.git (Aug 2013, #01; Thu, 1)

2013-08-03 Thread Thomas Rast
Junio C Hamano writes: > * tr/log-full-diff-keep-true-parents (2013-08-01) 1 commit > - log: use true parents for diff even when rewriting > > Output from "git log --full-diff -- " looked strange, > because comparison was done with the previous ancestor that touched > the specified , causing

Re: [PATCH] cherry-pick: allow "-" as abbreviation of '@{-1}'

2013-08-03 Thread Thomas Rast
Hiroshige Umino writes: > As "git cherry-pick -" or "git merge -" is convenient to > switch back to or merge the previous branch, > "git cherry-pick -" is abbreviation of "git cherry-pick @{-1}" > to pick up a commit from the previous branch conveniently. The first line is confusing. Did you me

Re: [PATCH v2] gc: reject if another gc is running, unless --force is given

2013-08-03 Thread Johannes Sixt
Am 03.08.2013 12:01, schrieb Duy Nguyen: > On Sat, Aug 03, 2013 at 11:49:02AM +0200, Johannes Sixt wrote: >> Am 03.08.2013 08:21, schrieb Nguyễn Thái Ngọc Duy: >>> I changed mingw.h to add a stub uname() because I don't think MinGW >>> port has that function, but that's totally untested. >> >> Th

Re: [PATCH] log: use true parents for diff when walking reflogs

2013-08-03 Thread Thomas Rast
Doh, once again I forgot the in-reply-to. This patch continues the thread after <20130731225520.gb25...@sigill.intra.peff.net>. This is -- strangely enough -- missing from gmane; its immediate predecessor is this: http://thread.gmane.org/gmane.comp.version-control.git/230968/focus=231453 Sorr

[PATCH] log: use true parents for diff when walking reflogs

2013-08-03 Thread Thomas Rast
The reflog walking logic (git log -g) replaces the true parent list with the preceding commit in the reflog. This results in bogus commit diffs when combined with options such as -p; the diff is against the reflog predecessor, not the parent of the commit. Save the true parents on the side, exten

Re: Rewriting git-repack.sh in C

2013-08-03 Thread Duy Nguyen
On Sat, Aug 3, 2013 at 1:33 PM, Fredrik Gustafsson wrote: > On Fri, Aug 02, 2013 at 09:10:59PM +0700, Duy Nguyen wrote: >> > So my question is, how you'd generally approach rewriting a >> > shell script in C. >> >> Start a new process via start_command/run_command interface. It's >> safer to retai

Re: [PATCH v2] gc: reject if another gc is running, unless --force is given

2013-08-03 Thread Duy Nguyen
On Sat, Aug 3, 2013 at 2:52 PM, Ramkumar Ramachandra wrote: >> + time(NULL) - st.st_mtime <= 12 * 3600) { > > Quick question: is this kind of file-lifetime used anywhere else in git.git? I don't think so. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the b

Re: [PATCH v2] gc: reject if another gc is running, unless --force is given

2013-08-03 Thread Duy Nguyen
On Sat, Aug 03, 2013 at 11:49:02AM +0200, Johannes Sixt wrote: > Am 03.08.2013 08:21, schrieb Nguyễn Thái Ngọc Duy: > > I changed mingw.h to add a stub uname() because I don't think MinGW > > port has that function, but that's totally untested. > > Thanks, but we don't have kill(pid, 0), either

Re: [PATCH v2] gc: reject if another gc is running, unless --force is given

2013-08-03 Thread Johannes Sixt
Am 03.08.2013 08:21, schrieb Nguyễn Thái Ngọc Duy: > I changed mingw.h to add a stub uname() because I don't think MinGW > port has that function, but that's totally untested. Thanks, but we don't have kill(pid, 0), either :-( -- Hannes -- To unsubscribe from this list: send the line "unsubscr

Re: [PATCH v2] gc: reject if another gc is running, unless --force is given

2013-08-03 Thread Ramkumar Ramachandra
Nguyễn Thái Ngọc Duy wrote: > This may happen when `git gc --auto` is run automatically, then the > user, to avoid wait time, switches to a new terminal, keeps working > and `git gc --auto` is started again because the first gc instance has > not clean up the repository. > > This patch tries to avo

Re: Please pull l10n updates for 1.8.4 round 1

2013-08-03 Thread Jiang Xin
2013/8/3 Jiang Xin : >>> are available in the git repository at: >>> >>>git://github.com/gotgit/git-po >> >> >> git://github.com/git-l10n/git-po >> > > Thanks Trần. Should be git-l10n/got-po, and gotgit/git-po does not exist. > In order to prevent this, next time when I generate this pull requ

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-03 Thread Jeff King
On Fri, Aug 02, 2013 at 11:30:03AM -0700, Junio C Hamano wrote: > > I didn't see the result of your wrangling in pu, but I will keep an eye > > out to double-check it (unless you did not finish, in which case I am > > happy to do the wrangling myself). > > Here is what is on top of the revert tha

Re: Please pull l10n updates for 1.8.4 round 1

2013-08-03 Thread Jiang Xin
2013/8/3 Trần Ngọc Quân : > On 03/08/2013 13:39, Jiang Xin wrote: >> >> Hi, Junio >> >> Please pull these updates for git l10n. >> >> BTW, Ralf's updates for de.po are still in the review process in this >> list, >> but I want to send this pull request earlier, because I find there are >> some >> n

Re: change remote to track new branch

2013-08-03 Thread Andreas Schwab
Daniel Convissor writes: > Long ago I added a remote to my repo. It is set to track what was then > WordPress' main release branch (3.4-branch) and created a local branch > to use it. Well, time marches on. I want to update my remote and > branch to track the new main release branch (3.6-branc

Re: What's cooking in git.git (Jul 2013, #09; Mon, 29)

2013-08-03 Thread Torsten Bögershausen
On 2013-08-03 08.50, Torsten Bögershausen wrote: > On 2013-08-01 22.51, Ramsay Jones wrote: >> Junio C Hamano wrote: >>> Ramsay Jones writes: >>> > I am personally in favor of this simpler solution. Comments? I had expected this to me marked for 'master'. Has this simply