Detecting redundant commits

2016-01-04 Thread greened
I am attempting to teach cherry-pick to handle redundant commits gracefully (via a new --skip-redundant-commits option) instead of aborting. However, I'm struggling a bit with how to check if the changes in a commit will become redundant when appied to the new HEAD. I found diff_tree_sha1 which s

Re: [PATCH] contrib/subtree: Remove --annotate

2016-01-04 Thread greened
Sebastian Schuberth writes: > On Sat, Jan 2, 2016 at 9:36 PM, David Greene wrote: > >> commit messages. git has other tools more suited to rewriting >> commit messages and it's easy enough to use them after a subtree >> split. > > For completeness, it probably would be a good idea to name examp

Subtree: My Status

2013-04-20 Thread greened
Hi folks, I apologize for being off the grid for a while. We had a baby and unexpectedly ended up in the NICU. We just got him home a week ago. Everyone is doing fine but I had to pretty much drop all non-essential work for a month or so. Rest assured that I have all of the git-subtree-related

Re: What's cooking in git.git (Feb 2013, #05; Tue, 12)

2013-02-18 Thread greened
Junio C Hamano writes: > * dg/subtree-fixes (2013-02-05) 6 commits > (merged to 'next' on 2013-02-09 at 8f19ebe) > + contrib/subtree: make the manual directory if needed > + contrib/subtree: honor DESTDIR > + contrib/subtree: fix synopsis > + contrib/subtree: better error handling for 'subt

Re: [PATCH 1/4] contrib/subtree: Store subtree sources in .gitsubtree and use for push/pull

2013-02-18 Thread greened
Paul Campbell writes: > Subsequent git subtree push/pull operations now default to the values > stored in .gitsubtree, unless overridden from the command line. > > The .gitsubtree file should be tracked as part of the repo as it > describes where parts of the tree came from and can be used to upd

Re: Rebased git-subtree changes

2013-02-18 Thread greened
Junio C Hamano writes: > This looks to be of mixed quality. The earlier ones look fairly > finished, while the later ones not so much. > > I am tempted to take up to 06/13 and advance them to 'next', without > the rest. Can you let me know what you've taken up? I have a new set with some fixes

Re: [PATCH 13/13] contrib/subtree: Remove --annotate

2013-02-18 Thread greened
James Nylen writes: > I don't agree that removing `--annotate` obviates the need for `--unannotate`. > > I responded on 1/17 with what I think is a typical and normal use case > for that option: Sorry, I must have missed that reply. > - add "fancylib" as a subtree of "myprog" > - commit to "m

Re: [PATCH 11/13] contrib/subtree: Make each test self-contained

2013-02-18 Thread greened
Junio C Hamano writes: > I also think it would be a good idea for you to learn to push back > to the original authors; fixing problems in patches by others, while > is a good way to learn how their thinking process went, is not > necessarily fun. Sure, but in this case I said I'd handle it so I

Re: Rebased git-subtree changes

2013-02-05 Thread greened
"David A. Greene" writes: > Here's a re-send of the git-subtree patches after rebasing onto > master. Hopefully Junio will have better luck applying these. Damn. Sorry, I sent this before getting all of the feedback. Just ignore this sequence and I'll send a fixed version in the future.

Re: [PATCH 2/8] Add --unannotate

2013-01-22 Thread greened
James Nylen writes: > I just now saw these emails. I'm having a hard time thinking of any > good use case other than: > > - add "fancylib" as a subtree of "myprog" > - commit to myprog repo: "fancylib: don't crash as much" > - split these commits back out to fancylib's main repo, and remove >

Re: [PATCH] Add --unannotate option to git-subtree

2013-01-22 Thread greened
James Nylen writes: > Wow, I missed a bunch of emails on this. Thanks for applying and for > writing tests! Sorry it took so long. > This is as intended. You wouldn't want subtree to modify commits that > occurred in the full repository for project A. Furthermore, you > wouldn't have a "subp

Re: [PATCH 2/7] contrib/subtree: Use %B for Split Subject/Body

2013-01-22 Thread greened
Junio C Hamano writes: > gree...@obbligato.org writes: > >> Are you incorporating the other patches? Should I drop them >> from my list? > > I actually was planning to accept patches to this subdirectory only > through you, hopefully as messages that forward others' changes with > your Acked-by:

Re: [PATCH 3/7] contrib/subtree: Add --unannotate

2013-01-22 Thread greened
Junio C Hamano writes: > gree...@obbligato.org writes: > >> gree...@obbligato.org writes: >> I think this paragraph inherits existing breakage from the beginning of time, but I do not think the above will format the second and subsequent paragraphs correctly. >>> >>> Ok, I'll take

Re: [PATCH 3/7] contrib/subtree: Add --unannotate

2013-01-15 Thread greened
gree...@obbligato.org writes: >> I think this paragraph inherits existing breakage from the beginning >> of time, but I do not think the above will format the second and >> subsequent paragraphs correctly. > > Ok, I'll take a look. I don't know what "correctly" is but it is at least formatted in

Re: [PATCH 4/7] contrib/subtree: Better Error Handling for add

2013-01-15 Thread greened
Junio C Hamano writes: > "David A. Greene" writes: > >> From: "David A. Greene" >> >> Check refspecs for validity before passing them on to other commands. >> This lets us generate more helpful error messages. >> >> Signed-off-by: David A. Greene >> --- >> contrib/subtree/git-subtree.sh | 1

Re: [PATCH 3/7] contrib/subtree: Add --unannotate

2013-01-15 Thread greened
Junio C Hamano writes: > "David A. Greene" writes: > >> diff --git a/contrib/subtree/git-subtree.txt >> b/contrib/subtree/git-subtree.txt >> index c5bce41..75aa690 100644 >> --- a/contrib/subtree/git-subtree.txt >> +++ b/contrib/subtree/git-subtree.txt >> @@ -198,6 +198,21 @@ OPTIONS FOR split

Re: [PATCH 2/7] contrib/subtree: Use %B for Split Subject/Body

2013-01-15 Thread greened
Junio C Hamano writes: > David, how would you like to handle a reroll of this piece? I'll just get the test fix from Techlive Zheng, apply it to my branch and re-send. Are you incorporating the other patches? Should I drop them from my list? -David -- To unsubscribe fr

Re: [PATCH 2/7] contrib/subtree: Use %B for Split Subject/Body

2013-01-15 Thread greened
Junio C Hamano writes: > "David A. Greene" writes: > >> From: Techlive Zheng >> >> Use %B to format the commit message and body to avoid an extra newline >> if a commit only has a subject line. >> >> Signed-off-by: Techlive Zheng >> >> Signed-off-by: David A. Greene >> --- > > This time (only

Re: [PATCH 2/8] Add --unannotate

2013-01-08 Thread greened
Junio C Hamano writes: > gree...@obbligato.org writes: > >> In the meantime, will you apply the patch or do you prefer a new design? > > The --unannotate option will become a baggage you will have to keep > working until the end of time, if we applied it. I think it is not > too uch a baggage, s

Re: [PATCH 1/8] Use %B for Split Subject/Body

2013-01-08 Thread greened
Junio C Hamano writes: > The question was about the lossage of the blank line, which does not > seem to be related to what this patch wants to do. Ah, missed that. -# 25 +#25 >>> >>> Why the lossage of a SP? >> >> I think this got fixed later in the series. > > That is not a good excu

Re: [PATCH 6/8] Make the Manual Directory if Needed

2013-01-01 Thread greened
Junio C Hamano writes: >> diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile >> index 36ae3e4..52d6fb9 100644 >> --- a/contrib/subtree/Makefile >> +++ b/contrib/subtree/Makefile >> @@ -35,6 +35,7 @@ install: $(GIT_SUBTREE) >> install-doc: install-man >> >> install-man: $(GIT_SUB

Re: [PATCH 5/8] Honor DESTDIR

2013-01-01 Thread greened
Junio C Hamano writes: > "David A. Greene" writes: > >> From: Adam Tkac >> >> Teach git-subtree's Makefile to honor DESTDIR. >> >> Author:Adam Tkac >> >> Signed-off-by:Adam Tkac >> >> Signed-off-by: David A. Greene >> --- > > The contents of the patch looks sensible; the above is que

Re: [PATCH 4/8] Fix Synopsis

2013-01-01 Thread greened
Junio C Hamano writes: >> -git subtree add --prefix= >> +git subtree add --prefix= > > Again, this is not but . Ok, I need to study the terminology. :) >> +git subtree add --prefix= > > This is given to "fetch" and it seems to acccept any , so > it is probably a good change (I didn'

Re: [PATCH 3/8] Better Error Handling for add

2013-01-01 Thread greened
Junio C Hamano writes: >> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh >> index 7ceb413..b8a807a 100755 >> --- a/contrib/subtree/git-subtree.sh >> +++ b/contrib/subtree/git-subtree.sh >> @@ -509,8 +509,20 @@ cmd_add() >> ensure_clean >> >> if [ $# -

Re: [PATCH 2/8] Add --unannotate

2013-01-01 Thread greened
Junio C Hamano writes: > "David A. Greene" writes: > >> From: James Nylen >> >> Teach git-subtree about --unannotate. This option strips a prefix >> from a commit message when doing a subtree split. > > Hrm. This looks like a workaround for a short-sighted misdesign of > the annotate option t

Re: [PATCH 1/8] Use %B for Split Subject/Body

2013-01-01 Thread greened
Junio C Hamano writes: > "David A. Greene" writes: > >> Subject: Re: [PATCH 1/8] Use %B for Split Subject/Body > > This needs to say "contrib/subtree" somewhere (applies to all > patches in this series). Ok. Shall I re-send everything? >> From: Techlive Zheng >> >> Use %B to format the commi

Re: [PATCH 1/8] Use %B for Split Subject/Body

2013-01-01 Thread greened
Junio C Hamano writes: > Also, please be careful about the subject line. I doubt that these > 8 patches will stand out as relating to "contrib/subtree", when mixed > in 200 line output of "git shortlog --no-merges". Ah, ok. I'll be more careful next time. -David -- T

Re: [PATCH 1/8] Use %B for Split Subject/Body

2013-01-01 Thread greened
Junio C Hamano writes: > "David A. Greene" writes: > >> From: Techlive Zheng >> >> Use %B to format the commit message and body to avoid an extra newline >> if a commit only has a subject line. > > Is this an unconditional improvement, or is it generally an > improvement but for some users it m

Re: [PATCH 1/8] Use %B for Split Subject/Body

2012-12-31 Thread greened
"David A. Greene" writes: > From: Techlive Zheng > > Use %B to format the commit message and body to avoid an extra newline > if a commit only has a subject line. Wow. So that was a spectacular fail. Sorry about th duplicate patch e-mails. I have no idea how that happened.

Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread greened
Junio C Hamano writes: >> With one positional option, git-subtree add simply assumes >> it's a refspec. Is there an easy way to check whether a string is a >> proper refspec? Even better would be a way to check if a string is a >> path to a git repository. > > Do you literally mean "a path to a

Re: [PATCH] subtree.sh: Use raw subject and body modifier "%B" instead of "%s%n%n%b"

2012-12-31 Thread greened
gree...@obbligato.org writes: > I've applied this patch to my working copy but I'm not finding that I > can recreate the original problem when the patch is disabled. ^ not -David -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a mess

Re: [PATCH] git-subtree: ignore git-subtree executable

2012-12-31 Thread greened
Michael Schubert writes: > Signed-off-by: Michael Schubert Obviously good. Applied and will send for integration. -David -- 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

Re: [PATCH] For git-subtree, when installing docs (make install-doc), create man1 folder first.

2012-12-31 Thread greened
"Jesper L. Nielsen" writes: > So, small patch to create the folder first in the Makefile. Hope > everything is right with the patch and submitting of the patch. I've applied this to my local copy and will send it to the list for integration. Thanks for fixing this! -Da

Re: [PATCH] For git-subtree, when installing docs (make install-doc), create man1 folder first.

2012-12-31 Thread greened
Junio C Hamano writes: > "Jesper L. Nielsen" writes: > >> From: "Jesper L. Nielsen" >> >> Hi.. >> >> I installed Git subtree and discovered that the if the man1dir doesn't exist >> the man-page for Git Subtree is just called man1. >> >> So, small patch to create the folder first in the Makefil

Re: [PATCH] DESTDIR support in contrib/subtree/Makefile

2012-12-31 Thread greened
Adam Tkac writes: > Signed-off-by: Adam Tkac > --- > > It is a good habit in Makefiles to honor DESTDIR variable to support > > `make DESTDIR=/instalroot install` > > syntax. > > Comments are welcomed. Applied. I'll be sending this to the mailing list tonight or tomorrow.

Re: [DOCBUG] git subtree synopsis needs updating

2012-12-31 Thread greened
Yann Dirson writes: > As the examples in git-subtree.txt show, the synopsis in the same file should > surely get a patch along the lines of: > > -'git subtree' add -P > +'git subtree' add -P > > Failure to specify the repository (by just specifying a local commit) fails > with > the cry

Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread greened
Drew Crawford writes: > Ideally it would be better to emit an error-message from a script > higher up the calling chain that would be more descriptive about the > problem (such as suggesting no branch is specified).-- Ok, I used git rev-parse --verify and I have this working now. Will send to J

Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread greened
Drew Crawford writes: > Ideally it would be better to emit an error-message from a script > higher up the calling chain that would be more descriptive about the > problem (such as suggesting no branch is specified).-- I'm looking at implementing this but I need a bit of help from the git experts

Re: [DOCBUG] git subtree synopsis needs updating

2012-12-31 Thread greened
Yann Dirson writes: > Ah, it's nice to see subtree updates. Any plans to get them merged anytime > soon ? As soon as there is one patch per feature that applies cleanly to contrib/ and testcases use the native git test facility. These patches should be submitted to the mailing list for review

Re: git subtree error (just how do you expect me to merge 0 trees?)

2012-12-31 Thread greened
Drew Crawford writes: > I noticed today that if you leave off the branch name from git subtree like > so: > > $ git subtree add --prefix somewhere -m "adding CDH as subtree" path/to/repo > warning: read-tree: emptying the index with no arguments is deprecated; use > --empty > fatal: just how do

Re: [BUG?] git-subtree behavior when the -P tree is removed and recreated

2012-12-31 Thread greened
Junio C Hamano writes: > Maybe it is a seasonal thing, just before the holiday season, but > this has been unresponded for a couple of months, not even with a > "That combination is not supported", or "Thanks for a bug report". I did finally see this message. I totally admit that I've been pret

Re: [BUG?] git-subtree behavior when the -P tree is removed and recreated

2012-12-31 Thread greened
Tomi Belan writes: > Thanks. Here's one more bump. Avery? David? I don't know how this is supposed to work, unfortunately. I'm still in the middle of learning the code... -David -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to

Re: [PATCH] Add --unannotate option to git-subtree

2012-12-31 Thread greened
James Nylen writes: > Rather than adding a marker to each commit when splitting out the > commits back to the subproject, --unannotate removes the specified > string (or bash glob pattern) from the beginning of the first line of > the commit message. This enables the following workflow: I appli

Re: [PATCH] Add --unannotate option to git-subtree

2012-12-31 Thread greened
Herman van Rink writes: >> Has anybody looked at this? >> >> It has been very useful for me. I am looking at it now. > The version of subtree in contrib is rather out-dated unfortunately. It is the official version. What's missing? You have a bunch of changes that need rework to include into

Re: [PATCH] subtree.sh: Use raw subject and body modifier "%B" instead of "%s%n%n%b"

2012-12-31 Thread greened
gree...@obbligato.org writes: > Techlive Zheng writes: > >> "%s%n%n%b" is not always equal to "%B". If the commit msg does not have >> a body, this will append an extra new-line character to the msg title >> which would cause the splited commit has a new sha1 hash. In most cases, >> this does not

Re: Bug/Enhancement: contrib/subtree should ship with manpage

2012-12-31 Thread greened
Neil writes: > Actual: git-subtree.1 fails to be generated because my system doesn't ship > asciidoc and xmlto. Well, you need those tools to build ANY git documentation. I just ran a test to build git-subtree and its documentation and it went just fine. This is not a bug.

libgit2 status

2012-08-24 Thread greened
What is the status of libgit2 WRT the overall git project? I recall that there was some discussion of basing bits of git on libgit2 once it matures. I ask because I'm starting a project to improve the abysmal speed of git-subtree split. It's unbearably slow at the moment and as far as I can puzz

Re: [PATCH/RFC] [git-subtree.sh] Use raw subject and body modifier "%B" instead of "%s%n%n%b" for commit

2012-08-20 Thread greened
Techlive Zheng writes: > I don't know if it is the right place to post this patch, I have sended > an email to the original author apenwarr and have no response. According > to > , > this is the place, but >

Re: A possible subtree split bug

2012-08-20 Thread greened
Fabien POTENCIER writes: > According to the docs: > > "Repeated splits of exactly the same history are > guaranteed to be identical (ie. to produce the same > commit ids). Because of this, if you add new commits > and then re-split, the new commits will be attached as > commits on top of the his

Re: [PATCH] subtree.sh: Use raw subject and body modifier "%B" instead of "%s%n%n%b"

2012-08-20 Thread greened
Techlive Zheng writes: > "%s%n%n%b" is not always equal to "%B". If the commit msg does not have > a body, this will append an extra new-line character to the msg title > which would cause the splited commit has a new sha1 hash. In most cases, > this does not matter, but for a project which did n