Re: specifying revision - how to enforce matching a tag/branch-name or revision only

2019-06-20 Thread Kyle Meyer
Hi, "Boettger, Heiko" writes: > Hi, > > I discovered an interesting problem when using `git checkout` to which > I couldn't find a good solution. We have an automatic system trying to > checkout a branch only when it exists. To do so we check whether `git > rev-parse` finds a commit for given br

push docs: inaccurate description of omitted destination?

2019-05-12 Thread Kyle Meyer
It seems to me that push's manpage contains a couple of inaccurate (or at least confusingly incomplete) statements about omitting the destination part of the refspec. First, the refspec section of the manpage has this to say: If `git push []` without any `` argument is set to update some

[PATCH] t3000 (ls-files -o): widen description to reflect current tests

2019-04-10 Thread Kyle Meyer
Remove the mention of symlinks from the test description because several tests that are not related to symlinks have been added since this file was introduced long ago. Signed-off-by: Kyle Meyer --- t/t3000-ls-files-others.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t

[PATCH v3 3/3] add: error appropriately on repository with no commits

2019-04-09 Thread Kyle Meyer
ing add_to_index() to error when given a git directory where HEAD can't be resolved. To avoid the embedded repository warning and hint, call check_embedded_repo() only after add_file_to_index() succeeds because, in general, its output doesn't make sense if adding to the index fails.

[PATCH v3 1/3] submodule: refuse to add repository with no commits

2019-04-09 Thread Kyle Meyer
commit will make 'git add' fail when given a repository that doesn't have a commit checked out. Signed-off-by: Kyle Meyer --- git-submodule.sh | 7 +++ t/t7400-submodule-basic.sh | 11 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/git-submodu

[PATCH v3 0/3] dir: treat a repository without commits as a repository

2019-04-09 Thread Kyle Meyer
use, technically, this series also concerns repositories that have commit objects but are on an unborn branch. * Change the "git submodule add" error message to match the wording of the new error message added in add_to_index(). * Consistently use "expect" rat

[PATCH v3 2/3] dir: do not traverse repositories with no commits

2019-04-09 Thread Kyle Meyer
d shows, calling 'git add' on a repository with no commit checked out will now raise an error. While this is the desired behavior, note that the output isn't yet appropriate. The next commit will improve this output. Signed-off-by: Kyle Meyer --- dir.c

Re: [PATCH v2 4/4] dir: do not traverse repositories with no commits

2019-04-03 Thread Kyle Meyer
Junio C Hamano writes: > Kyle Meyer writes: >> As the required update to t3700-add shows, being looser with the check >> means that we're stricter when adding empty repositories to the index: >> >> % git add repo >> warning: adding embedded git re

Re: [PATCH v2 2/4] t3000: move non-submodule repo test to separate file

2019-04-03 Thread Kyle Meyer
Junio C Hamano writes: > Kyle Meyer writes: > >> a2d5156c2b (resolve_gitlink_ref: ignore non-repository paths, >> 2016-01-22) added a test to t3000-ls-files-others.sh to check that >> 'ls-files -o' does not die() when given a subdirectory that looks like

[PATCH v2 3/4] t3009: test that ls-files -o traverses bogus repo

2019-04-02 Thread Kyle Meyer
_ happen in the non-bogus scenarios that will be added next. Rename the original subdirectory to highlight the difference with the new one. Signed-off-by: Kyle Meyer --- t/t3009-ls-files-others-nonsubmodule.sh | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(

[PATCH v2 2/4] t3000: move non-submodule repo test to separate file

2019-04-02 Thread Kyle Meyer
test to a separate file in preparation for testing scenarios with non-submodule repositories that are not bogus. Signed-off-by: Kyle Meyer --- t/t3000-ls-files-others.sh | 7 --- t/t3009-ls-files-others-nonsubmodule.sh | 21 + 2 files changed, 21 insert

[PATCH v2 4/4] dir: do not traverse repositories with no commits

2019-04-02 Thread Kyle Meyer
s. And if the caller really wants the previous behavior, they can get it by adding a trailing slash. Signed-off-by: Kyle Meyer --- dir.c | 6 -- t/t3009-ls-files-others-nonsubmodule.sh | 22 +- t/t3700-add.sh |

[PATCH v2 1/4] submodule: refuse to add repository with no commits

2019-04-02 Thread Kyle Meyer
iles in the sub-repository are added to the current repository. Detect if the path is a repository with no commits and abort to avoid getting into this state. Note that this check must come before the 'git add --dry-run' check because an upcoming commit will make 'git add'

[PATCH v2 0/4] dir: Treat a repository without commits as a repository

2019-04-02 Thread Kyle Meyer
> Kyle Meyer writes: > > [...] > >> diff --git a/git-submodule.sh b/git-submodule.sh >> index 514ede2596..6c74656027 100755 >> --- a/git-submodule.sh >> +++ b/git-submodule.sh >> @@ -234,10 +234,18 @@ cmd_add() >> if test -z "$force&quo

Re: [PATCH 1/4] submodule: refuse to add repository with no commits

2019-03-16 Thread Kyle Meyer
Kyle Meyer writes: [...] > diff --git a/git-submodule.sh b/git-submodule.sh > index 514ede2596..6c74656027 100755 > --- a/git-submodule.sh > +++ b/git-submodule.sh > @@ -234,10 +234,18 @@ cmd_add() > if test -z "$force" && > ! git a

[PATCH 3/4] t3009: test that ls-files -o traverses bogus repo

2019-03-14 Thread Kyle Meyer
_ happen in the non-bogus scenarios that will be added next. Rename the original subdirectory to highlight the difference with the new one. Signed-off-by: Kyle Meyer --- t/t3009-ls-files-others-nonsubmodule.sh | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(

[PATCH 1/4] submodule: refuse to add repository with no commits

2019-03-14 Thread Kyle Meyer
n this situation, but it allows us to use the same 'git add --dry-run' condition as the ignored path case. Signed-off-by: Kyle Meyer --- git-submodule.sh | 12 ++-- t/t7400-submodule-basic.sh | 11 ++- 2 files changed, 20 insertions(+), 3 deletions(-)

[PATCH 0/4] dir: Treat a repository without commits as a repository

2019-03-14 Thread Kyle Meyer
ntracked files of the no-commit/ repository to the index of the current repository. [*]: https://github.com/datalad/datalad/issues/3139#issuecomment-460542647 Kyle Meyer (4): submodule: refuse to add repository with no commits t3000: move non-submodule repo test to separate file t

[PATCH 2/4] t3000: move non-submodule repo test to separate file

2019-03-14 Thread Kyle Meyer
test to a separate file in preparation for testing scenarios with non-submodule repositories that are not bogus. Signed-off-by: Kyle Meyer --- t/t3000-ls-files-others.sh | 7 --- t/t3009-ls-files-others-nonsubmodule.sh | 21 + 2 files changed, 21 insert

[PATCH 4/4] dir: do not traverse repositories with no commits

2019-03-14 Thread Kyle Meyer
s. And if the caller really wants the previous behavior, they can get it by adding a trailing slash. Signed-off-by: Kyle Meyer --- dir.c | 6 -- t/t3009-ls-files-others-nonsubmodule.sh | 22 +- t/t3700-add.sh |

[PATCH] rebase docs: fix "gitlink" typo

2019-02-27 Thread Kyle Meyer
Change it to "linkgit" so that the reference is properly rendered. Signed-off-by: Kyle Meyer --- Documentation/git-rebase.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 5629ba4c5d..6363d674b7 10

[PATCH] init docs: correct a punctuation typo

2019-01-24 Thread Kyle Meyer
Signed-off-by: Kyle Meyer --- Documentation/git-init.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index 057076ca38..32880aafb0 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -128,7

[PATCH] rebase docs: drop stray word in merge command description

2018-12-08 Thread Kyle Meyer
Delete a misplaced word introduced by caafecfcf1 (rebase --rebase-merges: adjust man page for octopus support, 2018-03-09). Signed-off-by: Kyle Meyer --- Documentation/git-rebase.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-rebase.txt b/Documentation

Re: Git Evolve

2018-10-02 Thread Kyle Meyer
Ævar Arnfjörð Bjarmason writes: > On Tue, Oct 02 2018, Taylor Blau wrote: [...] >> Specifically, I've wanted the 'hg absorb' command. My understanding of >> the commands functionality is that it builds a sort of flamegraph-esque >> view of the blame, and then cascades downwards parts of a chang

[PATCH v3] range-diff: update stale summary of --no-dual-color

2018-08-23 Thread Kyle Meyer
d-off-by: Kyle Meyer --- builtin/range-diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/range-diff.c b/builtin/range-diff.c index f52d45d9d6..0aa9bed41f 100644 --- a/builtin/range-diff.c +++ b/builtin/range-diff.c @@ -25,7 +25,7 @@ int cmd_range_diff(int argc,

Re: [PATCH] range-diff: update stale summary of --no-dual-color

2018-08-23 Thread Kyle Meyer
Junio C Hamano writes: > Johannes Schindelin writes: [...] >>> - N_("color both diff and diff-between-diffs")), >>> + N_("restrict coloring to outer diff markers")), >> >> How about "use simple diff colors" instead? That's certainly better than the

[PATCH v2] range-diff: update stale summary of --no-dual-color

2018-08-23 Thread Kyle Meyer
275267937b (range-diff: make dual-color the default mode, 2018-08-13) replaced --dual-color with --no-dual-color but left the option's summary untouched. Rewrite the summary to describe --no-dual-color rather than dual-color. Helped-by: Jonathan Nieder Signed-off-by: Kyle Meyer --- bu

Re: [PATCH] range-diff: update stale summary of --no-dual-color

2018-08-22 Thread Kyle Meyer
Jonathan Nieder writes: - N_("color both diff and diff-between-diffs")), + N_("restrict coloring to outer diff markers")), [...] > Aha: I think you're missing a few words (e.g. "color only according to > outer diff markers"). Though based on

Re: [PATCH] range-diff: update stale summary of --no-dual-color

2018-08-22 Thread Kyle Meyer
Jonathan Nieder writes: [...] > What is an outer diff marker? The diff markers from the diff of patches as opposed to the ones from the original patches. I took the term from git-range-diff.txt: --no-dual-color:: When the commit diffs differ, `git range-diff` recreates the

[PATCH] range-diff: update stale summary of --no-dual-color

2018-08-22 Thread Kyle Meyer
275267937b (range-diff: make dual-color the default mode, 2018-08-13) replaced --dual-color with --no-dual-color but left the option's summary untouched. Rewrite the summary to describe --no-dual-color rather than dual-color. Signed-off-by: Kyle Meyer --- builtin/range-diff.c | 2 +- 1

Re: git-bug: Distributed bug tracker embedded in git

2018-08-18 Thread Kyle Meyer
[+cc Stefan Monnier] Jonathan Nieder writes: > (cc-ing Scott) [...] > I believe you're thinking of TicGit[1]. > > Some other related work is listed at [2]. Most of these projects have > gone quiet: > > - ditz[3] > - git-issues[4] > - cil[5] > - Bugs Everywhere[6] > - milli by Steve Kemp, whic

[PATCH] gitworkflows: fix grammar in 'Merge upwards' rule

2018-06-09 Thread Kyle Meyer
Signed-off-by: Kyle Meyer --- Documentation/gitworkflows.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/gitworkflows.txt b/Documentation/gitworkflows.txt index 926e044d0..ca11c7bda 100644 --- a/Documentation/gitworkflows.txt +++ b/Documentation

Re: [PATCH] git{,-blame}.el: remove old bitrotting Emacs code

2018-03-08 Thread Kyle Meyer
Ævar Arnfjörð Bjarmason writes: [...] > These days these modes have very few if users, and users of git aren't s/if// or s/if/if any/ ? -- Kyle

Re: [PATCH v2 6/7] reflog-walk: stop using fake parents

2017-07-07 Thread Kyle Meyer
Jeff King writes: > Prior to this commit, we show both entries with > identical reflog messages. After this commit, we show > only the "comes back" entry. See the update in t3200 > which demonstrates this. > > Arguably either is fine, as the whole double-entry > thin

Re: [PATCH v2 1/7] t1414: document some reflog-walk oddities

2017-07-07 Thread Kyle Meyer
Jeff King writes: > +test_expect_failure 'walking multiple reflogs shows all' ' > + # We expect to see all entries for all reflogs, but interleaved by > + # date, with order no the command line breaking ties. We s/order no/order on/ -- Kyle

Re: name-rev: anchor pattern without --exclude?

2017-07-06 Thread Kyle Meyer
Bryan Turner writes: [...] > If you don't need the ancestor traversals "git name-rev" provides, > "git for-each-ref --count 1 --format "%(refname:short)" --points-at > refs/heads/" might work. That only goes back to Git 2.7.0, > though; still quite a ways off your 1.9 target. ("git branch > --p

Re: name-rev: anchor pattern without --exclude?

2017-07-06 Thread Kyle Meyer
Junio C Hamano writes: > Kyle Meyer writes: > >> [*] A bit more information on why I'm trying to do this: In Magit, we >> have a work-in-progress feature that takes "snapshots" of changes >> before they are committed. These snapshots are

name-rev: anchor pattern without --exclude?

2017-07-06 Thread Kyle Meyer
Hello, I'm trying to restrict name-rev's output to a ref whose name begins with the supplied pattern [*]. Looking at "man git-name-rev", builtin/name-rev.c, and wildmatch.c, I don't see a way to accomplish this with "--refs=". Say, for example, that I want to limit name-rev's output to a ref in

Re: Truncating HEAD reflog on branch move

2017-06-21 Thread Kyle Meyer
Kyle Meyer writes: > Eh, sorry about that. I haven't dug very deeply, but it seems like the > entry is still in .git/logs/HEAD, while "git reflog" is only showing > they latest entry. s/entry is still/missing entries are still/

Re: Truncating HEAD reflog on branch move

2017-06-21 Thread Kyle Meyer
Junio C Hamano writes: > "brian m. carlson" writes: > >> I get the following on 2.11.0: >> >> 2cbfbd5 HEAD@{0}: >> 2cbfbd5 HEAD@{1}: checkout: moving from cPanel to master >> eaf8db2 HEAD@{2}: checkout: moving from master to cPanel >> 2cbfbd5 HEAD@{3}: clone: from >> https://b...@git.crustytoot

[PATCH] config.txt: add an entry for log.showSignature

2017-05-18 Thread Kyle Meyer
The configuration variable log.showSignature is mentioned in git-log's manpage. Document it in git-config's manpage as well. Signed-off-by: Kyle Meyer --- Documentation/config.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config

[PATCH] doc/revisions: remove brackets from rev^-n shorthand

2017-04-15 Thread Kyle Meyer
Given that other instances of "{...}" in the revision documentation represent literal characters of revision specifications, describing the rev^-n shorthand as "^-{}" incorrectly suggests that something like "master^-{1}" is an acceptable form. Signed-off-by:

[PATCH] t1400: use consistent style for test_expect_success calls

2017-04-15 Thread Kyle Meyer
Structure calls as test_expect_success 'description' ' body ' Use double quotes for the description if it requires parameter expansion or contains a single quote. Signed-off-by: Kyle Meyer --- This patch follows up on a recent t1400 series: https://

[PATCH] doc/config: grammar fixes for core.{editor,commentChar}

2017-03-23 Thread Kyle Meyer
Signed-off-by: Kyle Meyer --- Documentation/config.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 0d8df5a9f..1df196545 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -737,13 +737,13

Re: [PATCH 0/5] t1400: modernize style

2017-03-21 Thread Kyle Meyer
Junio C Hamano writes: > Jeff King writes: > >> On Mon, Mar 20, 2017 at 08:56:11PM -0400, Kyle Meyer wrote: [...] >>> I also considered >>> >>> * making the quoting/spacing/breaks around the test descriptions and >>> bodies more con

Re: [PATCH 2/5] t1400: set core.logAllRefUpdates in "logged by touch" tests

2017-03-21 Thread Kyle Meyer
Jeff King writes: > On Mon, Mar 20, 2017 at 08:56:13PM -0400, Kyle Meyer wrote: [...] >> I'm confused about the setup for the "logged by touch" tests. >> d0ab05849 (tests: remove some direct access to .git/logs, 2015-07-27) >> changed the setup to delete

Re: [PATCH 0/5] t1400: modernize style

2017-03-21 Thread Kyle Meyer
Jeff King writes: > On Mon, Mar 20, 2017 at 08:56:11PM -0400, Kyle Meyer wrote: [...] >> * moving the here-documents for log creation into the following >> tests, but I don't think it's worth it because it makes already >> long lines even longe

[PATCH 3/5] t1400: use test_path_is_* helpers

2017-03-20 Thread Kyle Meyer
Signed-off-by: Kyle Meyer --- t/t1400-update-ref.sh | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index be8b113b1..c5c8e95fc 100755 --- a/t/t1400-update-ref.sh +++ b/t/t1400-update

[PATCH 4/5] t1400: remove a set of unused output files

2017-03-20 Thread Kyle Meyer
This test case redirects stdout and stderr to output files, but, unlike the other cases of redirection in the t1400 tests, these files are not examined downstream. Remove the redirection so that the output is visible when running the tests verbosely. Signed-off-by: Kyle Meyer --- t/t1400

[PATCH 2/5] t1400: set core.logAllRefUpdates in "logged by touch" tests

2017-03-20 Thread Kyle Meyer
tests to disable core.logAllRefUpdates explicitly so that the behavior does not depend on the default value. While we're here, update the "logged by config" tests to use test_config() rather than setting core.logAllRefUpdates to "true" outside of the tests. Signed-off

[PATCH 0/5] t1400: modernize style

2017-03-20 Thread Kyle Meyer
These patches follow up on Peff's suggestion to modernize the style in t1400-update-ref.sh. 20170217082253.kxjezkxfqkfxj...@sigill.intra.peff.net The first two commits aren't concerned with "modernizing" the tests, but instead address issues that I noticed while looking more closely at t1400.

[PATCH 5/5] t1400: use test_when_finished for cleanup

2017-03-20 Thread Kyle Meyer
Move cleanup lines that occur after test blocks into test_when_finished calls within the test bodies. Don't move cleanup lines that seem to be related to mutiple tests rather than a single test. Signed-off-by: Kyle Meyer --- t/t1400-update-ref.sh

[PATCH 1/5] t1400: rename test descriptions to be unique

2017-03-20 Thread Kyle Meyer
A few tests share their description with another test. Extend the descriptions to indicate how the tests differ. Signed-off-by: Kyle Meyer --- t/t1400-update-ref.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index

Re: [PATCH v2 1/4] delete_ref: accept a reflog message argument

2017-02-24 Thread Kyle Meyer
Duy Nguyen writes: > You'll probably want to update the comment block above if msg can be > NULL. We have _very_ good documentation in this file, let's keep it > uptodate. Looking at how other functions in refs.h document their "msg" or "logmsg" parameter, none seem to mention it explicitly. up

Re: [PATCH v2 0/4] delete_ref: support reflog messages

2017-02-21 Thread Kyle Meyer
Junio C Hamano writes: > These looked reasonable. I had to resolve conflicts with another > topic in flight that removed set_worktree_head_symref() function > while queuing, and I think I resolved it correctly, but please > double check what is pushed out on 'pu'. The merge looks right to me, t

[PATCH v2 0/4] delete_ref: support reflog messages

2017-02-20 Thread Kyle Meyer
e "delete_refs" was written instead of "delete_ref". Kyle Meyer (4): delete_ref: accept a reflog message argument update-ref: pass reflog message to delete_ref() rename_ref: replace empty message in HEAD's log branch: record creation of renamed branch in H

[PATCH v2 3/4] rename_ref: replace empty message in HEAD's log

2017-02-20 Thread Kyle Meyer
xtend HEAD's log to also include the second part of the rename, the creation of the new branch. Helped-by: Jeff King Signed-off-by: Kyle Meyer --- refs/files-backend.c | 2 +- t/t3200-branch.sh| 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/refs/files-backend.c b/

[PATCH v2 1/4] delete_ref: accept a reflog message argument

2017-02-20 Thread Kyle Meyer
set. In contrast, the update for HEAD has REF_LOG_ONLY set by split_head_update(), resulting in the deletion being logged. Signed-off-by: Kyle Meyer --- builtin/am.c | 4 ++-- builtin/branch.c | 2 +- builtin/notes.c| 4 ++-- builtin/remote.c | 4 ++-- builtin/replac

[PATCH v2 4/4] branch: record creation of renamed branch in HEAD's log

2017-02-20 Thread Kyle Meyer
d for deletions, so it may not be worth the effort. Based-on-patch-by: Jeff King Signed-off-by: Kyle Meyer --- branch.c | 5 +++-- branch.h | 3 ++- builtin/branch.c | 5 +++-- refs.h | 3 ++- refs/files-backend.c | 4 ++-- t/t3200-branch.sh| 5 +++-

[PATCH v2 2/4] update-ref: pass reflog message to delete_ref()

2017-02-20 Thread Kyle Meyer
Now that delete_ref() accepts a reflog message, pass the user-provided message to delete_ref() rather than silently dropping it. Signed-off-by: Kyle Meyer --- builtin/update-ref.c | 2 +- t/t1400-update-ref.sh | 18 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff

Re: [PATCH 3/3] rename_ref: replace empty deletion message in HEAD's log

2017-02-17 Thread Kyle Meyer
Jeff King writes: > On Fri, Feb 17, 2017 at 02:43:50PM -0500, Jeff King wrote: > >> Yes. I think the options are basically (in order of decreasing >> preference in my opinion): >> >> 1. Log a rename entry (same sha1, but note the rename in the free-form >> text). >> >> 2. Log a delete

Re: [PATCH 3/3] rename_ref: replace empty deletion message in HEAD's log

2017-02-17 Thread Kyle Meyer
Junio C Hamano writes: [...] > Do we even want these "internal" delete_ref() invocations to be > logged in HEAD's reflog? I understand that this is inside the > implementation of renaming an old ref to a new ref, and reflog > message given to delete_ref() would matter only if the HEAD happens >

Re: [PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-17 Thread Kyle Meyer
Jeff King writes: [...] >> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh >> index b0ffc0b57..65918d984 100755 >> --- a/t/t1400-update-ref.sh >> +++ b/t/t1400-update-ref.sh >> @@ -85,6 +85,15 @@ test_expect_success "delete $m (by HEAD)" ' >> ' >> rm -f .git/$m >> >> +test_expect_

Re: [PATCH 1/3] delete_refs(): accept a reflog message argument

2017-02-17 Thread Kyle Meyer
Junio C Hamano writes: > Jeff King writes: > >>> diff --git a/refs.h b/refs.h >>> index 9fbff90e7..81627a63d 100644 >>> --- a/refs.h >>> +++ b/refs.h >>> @@ -277,7 +277,7 @@ int reflog_exists(const char *refname); >>> * be NULL_SHA1. flags is passed through to ref_transaction_delete(). >>> *

[PATCH 1/3] delete_refs(): accept a reflog message argument

2017-02-16 Thread Kyle Meyer
ke a message argument and pass it along to ref_transaction_delete(). Modify all callers to pass NULL for the new message argument; no change in behavior is intended. Signed-off-by: Kyle Meyer --- builtin/am.c | 4 ++-- builtin/branch.c | 2 +- builtin/notes.c| 4 ++

[PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-16 Thread Kyle Meyer
g a checked out branch. Signed-off-by: Kyle Meyer --- I'm not sure if the test here (or in the next patch) is worth including. builtin/update-ref.c | 2 +- t/t1400-update-ref.sh | 9 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/builtin/update-ref.c b/builti

[PATCH 3/3] rename_ref: replace empty deletion message in HEAD's log

2017-02-16 Thread Kyle Meyer
overs the renaming event with a message of "Branch: renamed ...". Signed-off-by: Kyle Meyer --- refs/files-backend.c | 8 +++- t/t3200-branch.sh| 4 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index ffa75d816..b

[PATCH 0/3] delete_ref(): support reflog messages

2017-02-16 Thread Kyle Meyer
[Sorry for the slow response.] Jeff King writes: > On Mon, Jan 16, 2017 at 06:17:29PM -0500, Kyle Meyer wrote: [...] >>$ cat .git/logs/refs/heads/new-master >>00000... 68730... Kyle Meyer 1484607020 -0500 commit >> (initial): Add file.txt >>6

Re: init --separate-git-dir does not set core.worktree

2017-02-04 Thread Kyle Meyer
Duy Nguyen writes: > On Thu, Feb 2, 2017 at 7:37 PM, Kyle Meyer wrote: [...] >> * COMMIT_EDITMSG in .git/modules//: set working tree to the >>output of "git rev-parse --show-toplevel" >> >> * COMMIT_EDITMSG in .git/worktrees//: set working tre

Re: init --separate-git-dir does not set core.worktree

2017-02-02 Thread Kyle Meyer
Duy Nguyen writes: > On Thu, Feb 2, 2017 at 10:55 AM, Kyle Meyer wrote: >> >> As of 6311cfaf9 (init: do not set unnecessary core.worktree, >> 2016-09-25), "git init --separate-git-dir" no longer sets core.worktree >> (test below). Based on the commit messa

init --separate-git-dir does not set core.worktree

2017-02-01 Thread Kyle Meyer
Hello, As of 6311cfaf9 (init: do not set unnecessary core.worktree, 2016-09-25), "git init --separate-git-dir" no longer sets core.worktree (test below). Based on the commit message and the corresponding thread [1], I don't think this change in behavior was intentional, but I wasn't able to under

HEAD's reflog entry for a renamed branch

2017-01-16 Thread Kyle Meyer
git branch -m master new-master resulted in the following reflogs: $ cat .git/logs/refs/heads/new-master 0... 68730... Kyle Meyer 1484607020 -0500 commit (initial): Add file.txt 68730... 68730... Kyle Meyer 1484607020 -0500 Branch: renamed refs/heads/master to refs/hea

Re: [PATCH] branch_get_push: do not segfault when HEAD is detached

2017-01-06 Thread Kyle Meyer
Jeff King writes: > On Fri, Jan 06, 2017 at 08:09:32PM -0500, Kyle Meyer wrote: > >> > $ git grep -c HEAD^{} junio/pu -- t/ >> > junio/pu:t/t3200-branch.sh:3 >> > >> > Maybe use HEAD^0 just for consistency? >> >> Yes, thanks for pointin

[PATCH v2] branch_get_push: do not segfault when HEAD is detached

2017-01-06 Thread Kyle Meyer
Move the detached HEAD check from branch_get_push_1() to branch_get_push() to avoid setting branch->push_tracking_ref when branch is NULL. Signed-off-by: Kyle Meyer --- remote.c | 6 +++--- t/t1514-rev-parse-push.sh | 6 ++ 2 files changed, 9 insertions(+), 3 deleti

Re: [PATCH] branch_get_push: do not segfault when HEAD is detached

2017-01-06 Thread Kyle Meyer
Johannes Schindelin writes: [...] >> +test_expect_success 'resolving @{push} fails with a detached HEAD' ' >> +git checkout HEAD^{} && > > I seem to recall that we prefer HEAD^0 over HEAD^{} and the existing > scripts seem to agree with me: > > $ git grep -c HEAD^0 junio/pu -- t/ > junio/pu:

[PATCH] branch_get_push: do not segfault when HEAD is detached

2017-01-05 Thread Kyle Meyer
Move the detached HEAD check from branch_get_push_1() to branch_get_push() to avoid setting branch->push_tracking_ref when branch is NULL. Signed-off-by: Kyle Meyer --- remote.c | 6 +++--- t/t1514-rev-parse-push.sh | 6 ++ 2 files changed, 9 insertions(+), 3 deleti

What's the ".git/gitdir" file?

2015-10-27 Thread Kyle Meyer
Hello, When a ".git" file points to another repo, a ".git/gitdir" file is created in that repo. For example, running $ mkdir repo-a repo-b $ cd repo-a $ git init $ cd ../repo-b $ echo "gitdir: ../repo-a/.git" > .git $ git status results in a file "repo-a/.git/gitdir" tha