emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Cc: Bastien <bzg@altern.org>,
	Jason Dunsmore <emacs-orgmode@dunsmor.com>,
	Andrea Crotti <andrea.crotti.0@gmail.com>,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: git diff: hunk header config
Date: Wed, 24 Aug 2011 21:20:45 +0200	[thread overview]
Message-ID: <CALn3zogn5siTrmj807FxoT74-tWodahi+5ABp_EFpv-ZqtrVxw@mail.gmail.com> (raw)
In-Reply-To: <CAMXnza2V-QfvKtoak9PiwmedFejwfU7SHcbwQeLMQX62MUco8Q@mail.gmail.com>

On Sat, Aug 20, 2011 at 23:47, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
> On Sat, Aug 20, 2011 at 6:12 PM, Michael Brand
>> [...]
>> "@@ -12991,7 +12991,7 @@ (defun org-align-tags-here (to-col)"
>> instead of the current
>> "@@ -12991,7 +12991,7 @@ If ONOFF is `on' or `off', don't toggle but set to thi"
>
> [...]
> To make this a server side setting, you would have to add .git/config
> and .gitattributes to the repo. But I think that is not correct as
> many users might have their own settings that will have to be remerged
> at every update.

According to the git manual there is a cleaner way for local changes:
- gitattributes(5) Manual Page:
  - "Attributes which should be version-controlled and distributed to
    other repositories (i.e., attributes of interest to all users)
    should go into .gitattributes files."
  - "If you wish to affect only a single repository (i.e., to assign
    attributes to files that are particular to one user’s workflow for
    that repository), then attributes should be placed in the
    $GIT_DIR/info/attributes file."
- git-config(1) Manual Page:
  - "$GIT_DIR/config: Repository specific configuration file." and
    "The .git/config file in each repository is used to store the
    configuration for that repository"
  - "~/.gitconfig: User-specific configuration file." and
    "$HOME/.gitconfig is used to store a per-user configuration as
    fallback values for the .git/config file."

For .gitattributes it seems to be ok to make it a versioned git repo
element. Proposal for the content (changed from first post):
#+begin_src
# This file is intended to be effective for all users of this repository.
# Use ".git/info/attributes" for changes specific to the local user(s).

*.el    diff=el
*.texi  diff=texinfo
#+end_src

For .git/config I am not sure if it can be made a versioned git repo
element. If not, I don't know how it can become part of the transfer
during git pull which it should be in any case. Proposal for the
content (changed from first post):
#+begin_src
# This file is intended to be effective for all users of this repository.
# Use "$HOME/.gitconfig" for changes specific to one user.

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git://orgmode.org/org-mode.git
[branch "master"]
	remote = origin
	merge = refs/heads/master
[diff "el"]
	xfuncname = "^(\\(def[a-z]+ .+)$"
[diff "texinfo"]
	xfuncname = "^(@(sub)*section.*)$"
#+end_src

> What do you think? In any case, I think this would be a wonderful
> addition to org-faq.org on Worg.

What I would like is that the hunk headers of all future patches from
all contributers look like proposed. Without requiring them to change
their config now and with every new git clone. For me it is not enough
if only a few contributers that stumble upon this FAQ entry and then
even care about, change their config.

Michael

  parent reply	other threads:[~2011-08-24 19:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-31 11:49 git diff: hunk header config Michael Brand
2011-08-20 16:12 ` Michael Brand
2011-08-20 21:47   ` suvayu ali
2011-08-24 10:39     ` Bastien
2011-08-24 19:20     ` Michael Brand [this message]
2011-08-24 19:37       ` Achim Gratz
2011-08-27  9:15         ` Michael Brand
2011-08-27  9:44           ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALn3zogn5siTrmj807FxoT74-tWodahi+5ABp_EFpv-ZqtrVxw@mail.gmail.com \
    --to=michael.ch.brand@gmail.com \
    --cc=andrea.crotti.0@gmail.com \
    --cc=bzg@altern.org \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@dunsmor.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).