Here is a small series to implement:
git replace [-f] --graft commit [parent...]
This patch series goes on top of the patch series that
implements --edit.
The changes since v5, thanks to Junio, are:
- new patch 1/10 to clean up redirection style in t6050
- new patches 8/10, 9/10 and
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
t/t6050-replace.sh | 48
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index 68b3cb2..fb07ad2 100755
--- a/t/t6050-replace.sh
+++
The usage string for this option is:
git replace [-f] --graft commit [parent...]
First we create a new commit that is the same as commit
except that its parents are [parents...]
Then we create a replace ref that replace commit with
the commit we just created.
With this new option, it should be
It could be misleading to keep a signature in a
replacement commit, so let's remove it.
Note that there should probably be a way to sign
the replacement commit created when using --graft,
but this can be dealt with in another commit or
patch series.
Signed-off-by: Christian Couder
This patch adds into contrib/ an example script to convert
grafts from an existing grafts file into replace refs using
the new --graft option of git replace.
While at it let's mention this new script in the
git replace documentation for the --graft option.
Signed-off-by: Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
t/t6050-replace.sh | 22 ++
1 file changed, 22 insertions(+)
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index 15fd541..3bb8d06 100755
--- a/t/t6050-replace.sh
+++ b/t/t6050-replace.sh
@@ -416,4 +416,26 @@
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
Signed-off-by: Junio C Hamano gits...@pobox.com
---
Documentation/git-replace.txt | 8
1 file changed, 8 insertions(+)
diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt
index 61461b9..491875e 100644
---
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
t/t6050-replace.sh | 25 +
1 file changed, 25 insertions(+)
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index d80a89e..15fd541 100755
--- a/t/t6050-replace.sh
+++ b/t/t6050-replace.sh
@@ -7,6 +7,7 @@
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
Signed-off-by: Junio C Hamano gits...@pobox.com
---
t/t6050-replace.sh | 40
1 file changed, 40 insertions(+)
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index fb07ad2..d80a89e 100755
---
When using --graft, with a mergetag in the original
commit, we should check that the commit pointed to by
the mergetag is still a parent of then new commit we
create, otherwise the mergetag could be misleading.
If the commit pointed to by the mergetag is no more
a parent of the new commit, we
In the same way as there is for_each_ref() to
iterate on refs, it might be useful to have
for_each_mergetag() to iterate on the mergetags
of a given commit.
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
commit.c | 13 +
commit.h | 5 +
log-tree.c | 15
Ramkumar Ramachandra artag...@gmail.com writes:
A couple of quick nits.
Tanay Abhra wrote:
+test_expect_success 'clear default config' '
+ rm -f .git/config
+'
Unnecessary; a fresh temporary directory is created for each test run.
Hmm, fresh, but not empty.
Anyway, the next test
Currently `git_config()` uses a callback mechanism and file rereads for
config values. Due to this approach, it is not uncommon for the config
files to be parsed several times during the run of a git program, with
different callbacks picking out different variables useful to themselves.
Add a
Hi,
[PATCH V6]: Style nits and mistakes corrected. Diff between v6 and v5[8] is at
the bottom.
Thanks to Matthieu, Ramsay and Ram for their suggestions.
[PATCH V5]: `config_set` now uses a single hashmap. Corrected style nits raised
in
the thread[7]. Thanks
Expose the `config_set` C API as a set of simple commands in order to
facilitate testing. Add tests for the `config_set` API as well as for
`git_config_get_*()` family for the usual config files.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
.gitignore | 1 +
Makefile
Is it possible to sign off squashed commits created by the 'git subtree add
... --squash' command?
I ask, because the Signed-off-by tag is a requirement for a project I work on,
but I've been unable to achieve this. A thorough search of Google/StackOverflow
reveals nothing.
Regards,
Stephen
On Mon, Jul 7, 2014 at 3:46 AM, Max Kirillov m...@max630.net wrote:
Hi.
What future does this have? Currently it is marked as
Stalled, but still mergeable with some trivial conflicts
and seem to be working (except some bugs in interaction with
submodules, see below). It would be very nice if
On ma, 2014-07-07 at 17:25 +0700, Duy Nguyen wrote:
I also have a comment about how it interacts with submodules.
Would it be more appropriate to mark modules as a
per-checkout directory? Because each of the working tree's
submodule is obviously a separated directory in filesystem,
and
Finucane, Stephen stephen.finuc...@intel.com writes:
Is it possible to sign off squashed commits created by the 'git subtree add
... --squash' command?
If it isn't directly possible, you can always use git commit --amend -C
HEAD -s to modify the commit afterwards.
Andreas.
--
Andreas
David Turner dtur...@twopensource.com writes:
I am not convinced that doing an equivalent of write-tree when you
switch branches is the right approach in the first place. You will
eventually write it out as a tree, and having a relatively undamaged
cache-tree will help you when you do so,
Tanay Abhra tanay...@gmail.com writes:
On 7/4/2014 2:47 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
Hi,
I have cooked up a single hashmap implementation. What are your
thoughts about it?
I had a quick look, and it looks good to me. I'll make a more detailed
review
Tanay Abhra tanay...@gmail.com writes:
diff --git a/t/t1308-config-hash.sh b/t/t1308-config-hash.sh
new file mode 100755
index 000..ad99f8b
--- /dev/null
+++ b/t/t1308-config-hash.sh
@@ -0,0 +1,168 @@
+#!/bin/sh
+
+test_description='Test git config-hash API in different settings'
Jens Lehmann jens.lehm...@web.de writes:
Junio, do you want me to resend 02/14 without the non-portable echo -n
or could you just squash the following diff in?
Amended locally here already; thanks, both.
-8
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index
Tanay Abhra tanay...@gmail.com writes:
test_expect_success 'find value with misspelled key' '
- echo Value not found for \my.fOo Bar.hi\ expect
- test_must_fail test-config get_value my.fOo Bar.hi actual
- test_cmp expect actual
+ check my.fOo Bar.hi Value not found for
On Mon, Jul 07, 2014 at 06:55:07PM +0200, Andreas Schwab wrote:
Finucane, Stephen stephen.finuc...@intel.com writes:
Is it possible to sign off squashed commits created by the 'git subtree
add ... --squash' command?
If it isn't directly possible, you can always use git commit --amend
Karsten Blees karsten.bl...@gmail.com writes:
Copying the first bytes of a SHA1 is duplicated in six places, however,
the implications (wrong byte order on little-endian systems) is documented
only once.
s/wrong /different /; but other than that I think this is a good
change.
+`unsigned int
On Mon, Jul 07, 2014 at 12:49:01PM +0200, Dennis Kaarsemaker wrote:
I do intend to use checkout --to and submodule update on the same
repository, but have not yet done so. I will poke at that later this
month. If you can easily reproduce errors, I would appreciate to know
how, because my use
Karsten Blees karsten.bl...@gmail.com writes:
Hashmap entries are typically looked up by just a key. The hashmap_get()
API expects an initialized entry structure instead, to support compound
keys. This flexibility is currently only needed by find_dir_entry() in
name-hash.c (and
Karsten Blees karsten.bl...@gmail.com writes:
Interning short strings with high probability of duplicates can reduce the
memory footprint and speed up comparisons.
Add strintern() and memintern() APIs that use a hashmap to manage the pool
of unique, interned strings.
Note:
John Keeping j...@keeping.me.uk writes:
Perhaps we shuld do something like this (which passes the test suite):
-- 8 --
diff --git a/git-rebase.sh b/git-rebase.sh
index 06c810b..0c6c5d3 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -544,7 +544,8 @@ if test $fork_point = t
then
Jens Lehmann jens.lehm...@web.de writes:
Only the two targets test-lint-duplicates and test-lint-executable are
currently executed when running the test target. This was done on purpose
when the TEST_LINT variable was added in 81127d74. But as this does not
include the test-lint-shell-syntax
David Turner dtur...@twopensource.com writes:
Add all of the ways in which check_refname_format violates valgrind's
expectations to the valgrind suppression file; remove an assumption about
the call chain of check_refname_format from same.
Signed-off-by: David Turner dtur...@twitter.com
---
Karsten Blees karsten.bl...@gmail.com writes:
'git checkout' fails if a directory is longer than PATH_MAX, because the
lstat_cache in symlinks.c checks if the leading directory exists using
PATH_MAX-bounded string operations.
Remove the limitation by using strbuf instead.
Good.
diff --git
David Turner dtur...@twopensource.com writes:
When git checkout checks out a branch, create or update the
cache-tree so that subsequent operations are faster.
update_main_cache_tree learned a new flag, WRITE_TREE_REPAIR. When
WRITE_TREE_REPAIR is set, portions of the cache-tree which do not
David Turner dtur...@twopensource.com writes:
Add tests to confirm that invalidation of subdirectories nether over-
nor under-invalidates.
Signed-off-by: David Turner dtur...@twitter.com
---
t/t0090-cache-tree.sh | 28 +---
1 file changed, 25 insertions(+), 3
David Turner dtur...@twopensource.com writes:
Do not treat known-invalid trees as errors even when their count is
incorrect. Because git already knows that these trees are invalid,
nothing depends on the count field.
s/count/subtree_nr/; they are different.
nothing depends on is not quite
On 2014-07-07 19.05, Junio C Hamano wrote:
Jens Lehmann jens.lehm...@web.de writes:
Junio, do you want me to resend 02/14 without the non-portable echo -n
or could you just squash the following diff in?
Amended locally here already; thanks, both.
There seems to be some other trouble under
David Turner dtur...@twopensource.com writes:
During the commit process, update the cache-tree. Write this updated
cache-tree so that it's ready for subsequent commands.
Add test code which demonstrates that git commit now writes the cache
tree. Make all tests test the entire cache-tree,
Andi Kleen a...@firstfloor.org writes:
From: Andi Kleen a...@linux.intel.com
Open: If the perf test suite is representative enough it may
be reasonable to only run that and skip the much longer full
test suite. Thoughts?
I do not think it right now is representative, nor it was meant to
On Mon, Jul 07, 2014 at 10:56:23AM -0700, Junio C Hamano wrote:
John Keeping j...@keeping.me.uk writes:
Perhaps we shuld do something like this (which passes the test suite):
-- 8 --
diff --git a/git-rebase.sh b/git-rebase.sh
index 06c810b..0c6c5d3 100755
--- a/git-rebase.sh
+++
Pete Wyckoff p...@padd.com writes:
I'm not sure how to robustify this. At least doing the multiple
comparisons should make the tests work again. The goal of this
series of tests is to make sure that copy detection is working,
not to verify that the correct copy choice was made. That should
I'd appreciate if someone could confirm that this is a bug in git, as this works
as expected with git 1.8.5.2.
I'm not sure if this 1.7.X is still supported, but I think it's still
the latest git-core available
in Ubuntu 12.04 repositories.
I'm having problems with git ls-files --others
On Mon, Jul 07, 2014 at 02:06:57PM -0700, Junio C Hamano wrote:
Andi Kleen a...@firstfloor.org writes:
From: Andi Kleen a...@linux.intel.com
Open: If the perf test suite is representative enough it may
be reasonable to only run that and skip the much longer full
test suite. Thoughts?
Christian Couder chrisc...@tuxfamily.org writes:
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
Signed-off-by: Junio C Hamano gits...@pobox.com
---
t/t6050-replace.sh | 40
1 file changed, 40 insertions(+)
diff --git a/t/t6050-replace.sh
Hi Hamilton,
Hamilton Turner wrote:
My project has this directory structure
.
├── aspnet
│ ├── .gitignore
│ ├── __init__.py
│ ├── lib
│ │ ├── lots of big stuff
My aspnet/.gitignore lists lib/*, and git add aspnet/lib/foo reports
that this path is ignored.
But git
Christian Couder chrisc...@tuxfamily.org writes:
When using --graft, with a mergetag in the original
commit, we should check that the commit pointed to by
the mergetag is still a parent of then new commit we
create, otherwise the mergetag could be misleading.
If the commit pointed to by the
Christian Couder chrisc...@tuxfamily.org writes:
In the same way as there is for_each_ref() to
iterate on refs, it might be useful to have
for_each_mergetag() to iterate on the mergetags
of a given commit.
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
---
Heh, might be useful is
Junio C Hamano gits...@pobox.com writes:
diff --git a/builtin/commit.c b/builtin/commit.c
index 9cfef6c..5981755 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -342,6 +342,8 @@ static char *prepare_index(int argc, const char **argv,
const char *prefix,
When git checkout checks out a branch, create or update the
cache-tree so that subsequent operations are faster.
update_main_cache_tree learned a new flag, WRITE_TREE_REPAIR. When
WRITE_TREE_REPAIR is set, portions of the cache-tree which do not
correspond to existing tree objects are
During the commit process, update the cache-tree. Write this updated
cache-tree so that it's ready for subsequent commands.
Add test code which demonstrates that git commit now writes the cache
tree. Make all tests test the entire cache-tree, not just the root
level.
Signed-off-by: David Turner
Do not treat known-invalid trees as errors even when their subtree_nr is
incorrect. Because git already knows that these trees are invalid,
an incorrect subtree_nr will not cause problems.
Add a couple of comments.
Signed-off-by: David Turner dtur...@twitter.com
---
test-dump-cache-tree.c | 4
Add tests to confirm that invalidation of subdirectories neither over-
nor under-invalidates.
Signed-off-by: David Turner dtur...@twitter.com
---
t/t0090-cache-tree.sh | 26 +++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/t/t0090-cache-tree.sh
I built this terribly-written alias because I wanted to see a list of
branches by date of commit. The output looks like this:
$ git bbd
11 months ago pipette_editor
7 weeks ago ensure-ie-rendering-edge
6 weeks ago strings-yml
5 weeks ago message-when-validation-fails
4 weeks
From: Junio C Hamano gits...@pobox.com
Christian Couder chrisc...@tuxfamily.org writes:
When using --graft, with a mergetag in the original
commit, we should check that the commit pointed to by
the mergetag is still a parent of then new commit we
create, otherwise the mergetag could be
From: Junio C Hamano gits...@pobox.com
Christian Couder chrisc...@tuxfamily.org writes:
Signed-off-by: Christian Couder chrisc...@tuxfamily.org
Signed-off-by: Junio C Hamano gits...@pobox.com
---
t/t6050-replace.sh | 40
1 file changed, 40
From: Junio C Hamano gits...@pobox.com
Christian Couder chrisc...@tuxfamily.org writes:
In the same way as there is for_each_ref() to
iterate on refs, it might be useful to have
for_each_mergetag() to iterate on the mergetags
of a given commit.
Signed-off-by: Christian Couder
56 matches
Mail list logo